12 enum discord_gateway_close_opcodes {
13 DISCORD_GATEWAY_CLOSE_REASON_UNKNOWN_ERROR = 4000,
14 DISCORD_GATEWAY_CLOSE_REASON_UNKNOWN_OPCODE = 4001,
15 DISCORD_GATEWAY_CLOSE_REASON_DECODE_ERROR = 4002,
16 DISCORD_GATEWAY_CLOSE_REASON_NOT_AUTHENTICATED = 4003,
17 DISCORD_GATEWAY_CLOSE_REASON_AUTHENTICATION_FAILED = 4004,
18 DISCORD_GATEWAY_CLOSE_REASON_ALREADY_AUTHENTICATED = 4005,
19 DISCORD_GATEWAY_CLOSE_REASON_INVALID_SEQUENCE = 4007,
20 DISCORD_GATEWAY_CLOSE_REASON_RATE_LIMITED = 4008,
21 DISCORD_GATEWAY_CLOSE_REASON_SESSION_TIMED_OUT = 4009,
22 DISCORD_GATEWAY_CLOSE_REASON_INVALID_SHARD = 4010,
23 DISCORD_GATEWAY_CLOSE_REASON_SHARDING_REQUIRED = 4011,
24 DISCORD_GATEWAY_CLOSE_REASON_INVALID_API_VERSION = 4012,
25 DISCORD_GATEWAY_CLOSE_REASON_INVALID_INTENTS = 4013,
26 DISCORD_GATEWAY_CLOSE_REASON_DISALLOWED_INTENTS = 4014,
28 extern char* discord_gateway_close_opcodes_to_string(
enum discord_gateway_close_opcodes);
29 extern enum discord_gateway_close_opcodes discord_gateway_close_opcodes_from_string(
char*);
30 extern bool discord_gateway_close_opcodes_has(
enum discord_gateway_close_opcodes,
char*);
33 enum discord_gateway_intents {
34 DISCORD_GATEWAY_GUILDS = 1,
35 DISCORD_GATEWAY_GUILD_MEMBERS = 2,
36 DISCORD_GATEWAY_GUILD_BANS = 4,
37 DISCORD_GATEWAY_GUILD_EMOJIS = 8,
38 DISCORD_GATEWAY_GUILD_INTEGRATIONS = 16,
39 DISCORD_GATEWAY_GUILD_WEBHOOKS = 32,
40 DISCORD_GATEWAY_GUILD_INVITES = 64,
41 DISCORD_GATEWAY_GUILD_VOICE_STATES = 128,
42 DISCORD_GATEWAY_GUILD_PRESENCES = 256,
43 DISCORD_GATEWAY_GUILD_MESSAGES = 512,
44 DISCORD_GATEWAY_GUILD_MESSAGE_REACTIONS = 1024,
45 DISCORD_GATEWAY_GUILD_MESSAGE_TYPING = 2048,
46 DISCORD_GATEWAY_DIRECT_MESSAGES = 4096,
47 DISCORD_GATEWAY_DIRECT_MESSAGE_REACTIONS = 8192,
48 DISCORD_GATEWAY_DIRECT_MESSAGE_TYPING = 16384,
50 extern char* discord_gateway_intents_to_string(
enum discord_gateway_intents);
51 extern enum discord_gateway_intents discord_gateway_intents_from_string(
char*);
52 extern bool discord_gateway_intents_has(
enum discord_gateway_intents,
char*);
55 enum discord_gateway_opcodes {
56 DISCORD_GATEWAY_DISPATCH = 0,
57 DISCORD_GATEWAY_HEARTBEAT = 1,
58 DISCORD_GATEWAY_IDENTIFY = 2,
59 DISCORD_GATEWAY_PRESENCE_UPDATE = 3,
60 DISCORD_GATEWAY_VOICE_STATE_UPDATE = 4,
61 DISCORD_GATEWAY_RESUME = 6,
62 DISCORD_GATEWAY_RECONNECT = 7,
63 DISCORD_GATEWAY_REQUEST_GUILD_MEMBERS = 8,
64 DISCORD_GATEWAY_INVALID_SESSION = 9,
65 DISCORD_GATEWAY_HELLO = 10,
66 DISCORD_GATEWAY_HEARTBEAT_ACK = 11,
68 extern char* discord_gateway_opcodes_to_string(
enum discord_gateway_opcodes);
69 extern enum discord_gateway_opcodes discord_gateway_opcodes_from_string(
char*);
70 extern bool discord_gateway_opcodes_has(
enum discord_gateway_opcodes,
char*);
73 enum discord_gateway_events {
74 DISCORD_GATEWAY_EVENTS_NONE = 0,
75 DISCORD_GATEWAY_EVENTS_GUILD_CREATE = 1,
76 DISCORD_GATEWAY_EVENTS_GUILD_UPDATE = 2,
77 DISCORD_GATEWAY_EVENTS_GUILD_DELETE = 3,
78 DISCORD_GATEWAY_EVENTS_GUILD_ROLE_CREATE = 4,
79 DISCORD_GATEWAY_EVENTS_GUILD_ROLE_UPDATE = 5,
80 DISCORD_GATEWAY_EVENTS_GUILD_ROLE_DELETE = 6,
81 DISCORD_GATEWAY_EVENTS_GUILD_MEMBER_ADD = 7,
82 DISCORD_GATEWAY_EVENTS_GUILD_MEMBER_UPDATE = 8,
83 DISCORD_GATEWAY_EVENTS_GUILD_MEMBER_REMOVE = 9,
84 DISCORD_GATEWAY_EVENTS_GUILD_BAN_ADD = 10,
85 DISCORD_GATEWAY_EVENTS_GUILD_BAN_REMOVE = 11,
86 DISCORD_GATEWAY_EVENTS_GUILD_EMOJIS_UPDATE = 12,
87 DISCORD_GATEWAY_EVENTS_GUILD_INTEGRATIONS_UPDATE = 13,
88 DISCORD_GATEWAY_EVENTS_CHANNEL_CREATE = 14,
89 DISCORD_GATEWAY_EVENTS_CHANNEL_UPDATE = 15,
90 DISCORD_GATEWAY_EVENTS_CHANNEL_DELETE = 16,
91 DISCORD_GATEWAY_EVENTS_CHANNEL_PINS_UPDATE = 17,
92 DISCORD_GATEWAY_EVENTS_INVITE_CREATE = 18,
93 DISCORD_GATEWAY_EVENTS_INVITE_DELETE = 19,
94 DISCORD_GATEWAY_EVENTS_MESSAGE_CREATE = 20,
95 DISCORD_GATEWAY_EVENTS_MESSAGE_UPDATE = 21,
96 DISCORD_GATEWAY_EVENTS_MESSAGE_DELETE = 22,
97 DISCORD_GATEWAY_EVENTS_MESSAGE_DELETE_BULK = 23,
98 DISCORD_GATEWAY_EVENTS_MESSAGE_REACTION_ADD = 24,
99 DISCORD_GATEWAY_EVENTS_MESSAGE_REACTION_REMOVE = 25,
100 DISCORD_GATEWAY_EVENTS_MESSAGE_REACTION_REMOVE_ALL = 26,
101 DISCORD_GATEWAY_EVENTS_MESSAGE_REACTION_REMOVE_EMOJI = 27,
102 DISCORD_GATEWAY_EVENTS_WEBHOOKS_UPDATE = 28,
103 DISCORD_GATEWAY_EVENTS_VOICE_STATE_UPDATE = 29,
104 DISCORD_GATEWAY_EVENTS_VOICE_SERVER_UPDATE = 30,
105 DISCORD_GATEWAY_EVENTS_PRESENCE_UPDATE = 31,
106 DISCORD_GATEWAY_EVENTS_TYPING_START = 32,
107 DISCORD_GATEWAY_EVENTS_READY = 33,
108 DISCORD_GATEWAY_EVENTS_RESUMED = 34,
110 extern char* discord_gateway_events_to_string(
enum discord_gateway_events);
111 extern enum discord_gateway_events discord_gateway_events_from_string(
char*);
112 extern bool discord_gateway_events_has(
enum discord_gateway_events,
char*);
139 bool guild_subscriptions;
159 bool enable_arg_switches;
160 bool enable_record_defined;
161 bool enable_record_null;
162 void *arg_switches[8];
163 void *record_defined[8];
164 void *record_null[8];
168 extern void discord_gateway_identify_cleanup_v(
void *p);
170 extern void discord_gateway_identify_init_v(
void *p);
173 extern void discord_gateway_identify_free_v(
void *p);
175 extern void discord_gateway_identify_from_json_v(
char *json,
size_t len,
void *p);
177 extern size_t discord_gateway_identify_to_json_v(
char *json,
size_t len,
void *p);
179 extern size_t discord_gateway_identify_to_query_v(
char *json,
size_t len,
void *p);
181 extern void discord_gateway_identify_list_free_v(
void **p);
183 extern void discord_gateway_identify_list_from_json_v(
char *str,
size_t len,
void *p);
185 extern size_t discord_gateway_identify_list_to_json_v(
char *str,
size_t len,
void *p);
219 bool enable_arg_switches;
220 bool enable_record_defined;
221 bool enable_record_null;
222 void *arg_switches[4];
223 void *record_defined[4];
224 void *record_null[4];
228 extern void discord_gateway_status_update_cleanup_v(
void *p);
230 extern void discord_gateway_status_update_init_v(
void *p);
233 extern void discord_gateway_status_update_free_v(
void *p);
235 extern void discord_gateway_status_update_from_json_v(
char *json,
size_t len,
void *p);
237 extern size_t discord_gateway_status_update_to_json_v(
char *json,
size_t len,
void *p);
239 extern size_t discord_gateway_status_update_to_query_v(
char *json,
size_t len,
void *p);
241 extern void discord_gateway_status_update_list_free_v(
void **p);
243 extern void discord_gateway_status_update_list_from_json_v(
char *str,
size_t len,
void *p);
245 extern size_t discord_gateway_status_update_list_to_json_v(
char *str,
size_t len,
void *p);
273 bool enable_arg_switches;
274 bool enable_record_defined;
275 bool enable_record_null;
276 void *arg_switches[3];
277 void *record_defined[3];
278 void *record_null[3];
282 extern void discord_gateway_identify_connection_cleanup_v(
void *p);
284 extern void discord_gateway_identify_connection_init_v(
void *p);
287 extern void discord_gateway_identify_connection_free_v(
void *p);
289 extern void discord_gateway_identify_connection_from_json_v(
char *json,
size_t len,
void *p);
291 extern size_t discord_gateway_identify_connection_to_json_v(
char *json,
size_t len,
void *p);
293 extern size_t discord_gateway_identify_connection_to_query_v(
char *json,
size_t len,
void *p);
295 extern void discord_gateway_identify_connection_list_free_v(
void **p);
297 extern void discord_gateway_identify_connection_list_from_json_v(
char *str,
size_t len,
void *p);
299 extern size_t discord_gateway_identify_connection_list_to_json_v(
char *str,
size_t len,
void *p);
353 bool enable_arg_switches;
354 bool enable_record_defined;
355 bool enable_record_null;
356 void *arg_switches[8];
357 void *record_defined[8];
358 void *record_null[8];
362 extern void discord_gateway_activity_cleanup_v(
void *p);
364 extern void discord_gateway_activity_init_v(
void *p);
367 extern void discord_gateway_activity_free_v(
void *p);
369 extern void discord_gateway_activity_from_json_v(
char *json,
size_t len,
void *p);
371 extern size_t discord_gateway_activity_to_json_v(
char *json,
size_t len,
void *p);
373 extern size_t discord_gateway_activity_to_query_v(
char *json,
size_t len,
void *p);
375 extern void discord_gateway_activity_list_free_v(
void **p);
377 extern void discord_gateway_activity_list_from_json_v(
char *str,
size_t len,
void *p);
379 extern size_t discord_gateway_activity_list_to_json_v(
char *str,
size_t len,
void *p);
383 enum discord_gateway_activity_types {
384 DISCORD_GATEWAY_ACTIVITY_GAME = 0,
385 DISCORD_GATEWAY_ACTIVITY_STREAMING = 1,
386 DISCORD_GATEWAY_ACTIVITY_LISTENING = 2,
387 DISCORD_GATEWAY_ACTIVITY_CUSTOM = 4,
388 DISCORD_GATEWAY_ACTIVITY_COMPETING = 5,
390 extern char* discord_gateway_activity_types_to_string(
enum discord_gateway_activity_types);
391 extern enum discord_gateway_activity_types discord_gateway_activity_types_from_string(
char*);
392 extern bool discord_gateway_activity_types_has(
enum discord_gateway_activity_types,
char*);