forked from LagrangeDev/Lagrange.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'LagrangeDev:master' into master
- Loading branch information
Showing
31 changed files
with
626 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
namespace Lagrange.Core.Common.Entity; | ||
|
||
[Serializable] | ||
public class BotGroupClockInResult | ||
{ | ||
public BotGroupClockInResult() { } | ||
|
||
public BotGroupClockInResult(bool isSuccess) | ||
{ | ||
IsSuccess = isSuccess; | ||
} | ||
|
||
/// <summary> | ||
/// Is the clock in successful | ||
/// </summary> | ||
public bool IsSuccess { get; set; } = false; | ||
|
||
/// <summary> | ||
/// Maybe "今日已成功打卡" | ||
/// </summary> | ||
public string Title { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Maybe "已打卡N天" | ||
/// </summary> | ||
public string KeepDayText { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Maybe "群内排名第N位" | ||
/// </summary> | ||
public string GroupRankText { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// The utc time of clock in | ||
/// </summary> | ||
public DateTime ClockInUtcTime { get; set; } = DateTime.UnixEpoch; // 打卡时间 | ||
|
||
/// <summary> | ||
/// Detail info url | ||
/// </summary> | ||
public string DetailUrl { get; set; } = string.Empty; // https://qun.qq.com/v2/signin/detail?... | ||
|
||
public static BotGroupClockInResult Fail() => new BotGroupClockInResult() | ||
{ | ||
IsSuccess = false | ||
}; | ||
|
||
public static BotGroupClockInResult Success() => new BotGroupClockInResult() | ||
{ | ||
IsSuccess = true | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Lagrange.Core.Common.Entity; | ||
|
||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class GroupClockInEvent : ProtocolEvent | ||
{ | ||
public uint GroupUin { get; set; } | ||
public BotGroupClockInResult? ResultInfo { get; set; } | ||
|
||
private GroupClockInEvent(uint groupUin) : base(true) | ||
{ | ||
GroupUin = groupUin; | ||
ResultInfo = null; | ||
} | ||
|
||
private GroupClockInEvent(int resultCode, BotGroupClockInResult result) : base(resultCode) | ||
{ | ||
ResultInfo = result; | ||
} | ||
|
||
public static GroupClockInEvent Create(uint groupUin) => new(groupUin); | ||
|
||
public static GroupClockInEvent Result(int resultCode, BotGroupClockInResult result) => new(resultCode, result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Lagrange.Core/Internal/Event/Action/GroupFSDeleteFolderEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class GroupFSDeleteFolderEvent : ProtocolEvent | ||
{ | ||
public uint GroupUin { get; } | ||
|
||
public string FolderId { get; } = string.Empty; | ||
|
||
public string RetMsg { get; set; } = string.Empty; | ||
|
||
private GroupFSDeleteFolderEvent(uint groupUin, string folderId) : base(true) | ||
{ | ||
GroupUin = groupUin; | ||
FolderId = folderId; | ||
} | ||
|
||
private GroupFSDeleteFolderEvent(int resultCode, string retMsg) : base(resultCode) | ||
{ | ||
RetMsg = retMsg; | ||
} | ||
|
||
public static GroupFSDeleteFolderEvent Create(uint groupUin, string folderId) => new(groupUin, folderId); | ||
|
||
public static GroupFSDeleteFolderEvent Result(int resultCode, string retMsg) => new(resultCode, retMsg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Lagrange.Core/Internal/Event/Action/GroupFSRenameFolderEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class GroupFSRenameFolderEvent : ProtocolEvent | ||
{ | ||
public uint GroupUin { get; } | ||
|
||
public string FolderId { get; } = string.Empty; | ||
|
||
public string NewFolderName { get; } = string.Empty; | ||
|
||
public string RetMsg { get; set; } = string.Empty; | ||
|
||
private GroupFSRenameFolderEvent(uint groupUin, string folderId, string newFolderName) : base(true) | ||
{ | ||
GroupUin = groupUin; | ||
FolderId = folderId; | ||
NewFolderName = newFolderName; | ||
} | ||
|
||
private GroupFSRenameFolderEvent(int resultCode, string retMsg) : base(resultCode) | ||
{ | ||
RetMsg = retMsg; | ||
} | ||
|
||
public static GroupFSRenameFolderEvent Create(uint groupUin, string folderId, string newFolderName) => new(groupUin, folderId, newFolderName); | ||
|
||
public static GroupFSRenameFolderEvent Result(int resultCode, string retMsg) => new(resultCode, retMsg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x6D7_1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Request; | ||
|
||
#pragma warning disable CS8618 | ||
// ReSharper disable InconsistentNaming | ||
|
||
/// <summary> | ||
/// Delete Folder | ||
/// </summary> | ||
[ProtoContract] | ||
[OidbSvcTrpcTcp(0x6D7, 1)] | ||
internal class OidbSvcTrpcTcp0x6D7_1 | ||
{ | ||
[ProtoMember(2)] public OidbSvcTrpcTcp0x6D7_1Delete Delete { get; set; } | ||
} | ||
|
||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x6D7_1Delete | ||
{ | ||
[ProtoMember(1)] public uint GroupUin { get; set; } | ||
|
||
[ProtoMember(3)] public string FolderId { get; set; } | ||
} |
26 changes: 26 additions & 0 deletions
26
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x6D7_2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Request; | ||
|
||
#pragma warning disable CS8618 | ||
// ReSharper disable InconsistentNaming | ||
|
||
/// <summary> | ||
/// Delete Folder | ||
/// </summary> | ||
[ProtoContract] | ||
[OidbSvcTrpcTcp(0x6D7, 2)] | ||
internal class OidbSvcTrpcTcp0x6D7_2 | ||
{ | ||
[ProtoMember(3)] public OidbSvcTrpcTcp0x6D7_2Rename Rename { get; set; } | ||
} | ||
|
||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x6D7_2Rename | ||
{ | ||
[ProtoMember(1)] public uint GroupUin { get; set; } | ||
|
||
[ProtoMember(3)] public string FolderId { get; set; } | ||
|
||
[ProtoMember(4)] public string NewFolderName { get; set; } | ||
} |
Oops, something went wrong.