forked from LagrangeDev/LagrangeV2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBotGroupReactionEventStruct.cs
More file actions
38 lines (30 loc) · 1.06 KB
/
Copy pathBotGroupReactionEventStruct.cs
File metadata and controls
38 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Runtime.InteropServices;
using System.Text;
using Lagrange.Core.Events.EventArgs;
using Lagrange.Core.NativeAPI.NativeModel.Common;
namespace Lagrange.Core.NativeAPI.NativeModel.Event
{
[StructLayout(LayoutKind.Sequential)]
public struct BotGroupReactionEventStruct : IEventStruct
{
public BotGroupReactionEventStruct() { }
public long TargetGroupUin = 0;
public ulong TargetSequence = 0;
public long OperatorUin = 0;
public bool IsAdd = false;
public ByteArrayNative Code = new();
public ulong CurrentCount = 0;
public static implicit operator BotGroupReactionEventStruct(BotGroupReactionEvent e)
{
return new BotGroupReactionEventStruct()
{
TargetGroupUin = e.TargetGroupUin,
TargetSequence = e.TargetSequence,
OperatorUin = e.OperatorUin,
IsAdd = e.IsAdd,
Code = Encoding.UTF8.GetBytes(e.Code),
CurrentCount = e.CurrentCount
};
}
}
}