-
Notifications
You must be signed in to change notification settings - Fork 2
/
onebot_event.proto
241 lines (226 loc) · 5.49 KB
/
onebot_event.proto
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
syntax = "proto3";
package onebot;
import "onebot_base.proto";
message PrivateMessageEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string message_type = 4;
string sub_type = 5;
int32 message_id = 6; // 兼容旧版GMC
int64 user_id = 7;
repeated Message message = 8;
string raw_message = 9;
int32 font = 10;
Sender sender = 11;
MessageReceipt message_receipt = 12;
message Sender{
int64 user_id = 1;
string nickname = 2;
string sex = 3;
int32 age = 4;
}
map<string, string> extra = 255;
}
message GroupMessageEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string message_type = 4;
string sub_type = 5;
int32 message_id = 6; // 兼容旧版GMC
int64 group_id = 7;
int64 user_id = 8;
Anonymous anonymous = 9;
repeated Message message = 10;
string raw_message = 11;
int32 font = 12;
Sender sender = 13;
MessageReceipt message_receipt = 14;
message Anonymous{
int64 id = 1;
string name = 2;
string flag = 3;
}
message Sender{
int64 user_id = 1;
string nickname = 2;
string card = 3;
string sex = 4;
int32 age = 5;
string area = 6;
string level = 7;
string role = 8;
string title = 9;
}
map<string, string> extra = 255;
}
message ChannelMessageEvent{
uint64 id = 1;
uint64 internal_id = 2;
uint64 guild_id = 3;
uint64 channel_id = 4;
int64 time = 5;
int64 self_id = 6;
string post_type = 7;
string message_type = 8;
string sub_type = 9;
repeated Message message = 10;
string raw_message = 11;
int32 font = 12;
Sender sender = 13;
uint64 message_id = 14;
message Sender{
uint64 tiny_id = 1;
string nickname = 2;
repeated uint64 roles = 3;
repeated string role_names =4;
}
map<string, string> extra = 255;
}
message GroupTempMessageEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string message_type = 4;
int64 group_id = 7;
int64 user_id = 8;
repeated Message message = 10;
string raw_message = 11;
MessageReceipt message_receipt = 14;
int32 message_id = 15; // 兼容旧版GMC
map<string, string> extra = 255;
}
message GroupUploadNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
int64 group_id = 5;
int64 user_id = 6;
File file = 7;
message File{
string id = 1;
string name = 2;
int64 size = 3;
int64 busid = 4;
string url = 5;
}
map<string, string> extra = 255;
}
message GroupNotifyEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
int64 group_id = 5;
string group_name = 6;
int64 sender = 7;
string sender_card = 8;
int64 target_id = 9;
string target_card = 10;
string honor = 11;
}
message GroupAdminNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
string sub_type = 5;
int64 group_id = 6;
int64 user_id = 7;
map<string, string> extra = 255;
}
message GroupDecreaseNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
string sub_type = 5;
int64 group_id = 6;
int64 operator_id = 7;
int64 user_id = 8;
map<string, string> extra = 255;
}
message GroupIncreaseNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
string sub_type = 5;
int64 group_id = 6;
int64 operator_id = 7;
int64 user_id = 8;
map<string, string> extra = 255;
}
message GroupBanNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
string sub_type = 5;
int64 group_id = 6;
int64 operator_id = 7;
int64 user_id = 8;
int64 duration = 9;
map<string, string> extra = 255;
}
message FriendAddNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
int64 user_id = 5;
map<string, string> extra = 255;
}
message GroupRecallNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
int64 group_id = 5;
int64 user_id = 6;
int64 operator_id = 7;
int32 message_id = 8; // 兼容旧版GMC
MessageReceipt message_receipt = 9;
map<string, string> extra = 255;
}
message FriendRecallNoticeEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string notice_type = 4;
int64 user_id = 5;
int32 message_id = 6; // 兼容旧版GMC
MessageReceipt message_receipt = 7;
map<string, string> extra = 255;
}
message FriendRequestEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string request_type = 4;
int64 user_id = 5;
string comment = 6;
string flag = 7;
map<string, string> extra = 255;
}
message GroupRequestEvent{
int64 time = 1;
int64 self_id = 2;
string post_type = 3;
string request_type = 4;
string sub_type = 5;
int64 group_id = 6;
int64 user_id = 7;
string comment = 8;
string flag = 9;
int64 request_id = 10;
string user_nick = 11;
string group_name = 12;
string action_uin_nick = 13;
int64 action_uin = 14;
bool check = 15;
bool suspicious = 16;
map<string, string> extra = 255;
}