DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
EventManager.hpp
Go to the documentation of this file.
1/*
2 DiscordCoreAPI, A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
3
4 Copyright 2021, 2022 Chris M. (RealTimeChris)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 USA
20*/
21/// EventManager.hpp - Header for the event manager class.
22/// Apr 26, 2021
23/// https://discordcoreapi.com
24/// \file EventManager.hpp
25
26#pragma once
27
40
41namespace DiscordCoreAPI {
42
43 /**
44 * \addtogroup discord_events
45 * @{
46 */
47 /// \brief Data that is received as part of a Gateway ping event.
48 struct DiscordCoreAPI_Dll OnGatewayPingData {
49 int32_t timeUntilNextPing{};///< The number of milliseconds until the next ping.
50 };
51
52 /// \brief Data that is received as part of an InputEvent creation event.
53 struct DiscordCoreAPI_Dll OnInputEventCreationData {
54 InputEventData inputEventData{};///< InputEventData representing the input-event.
55 OnInputEventCreationData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
56 };
57
58 /// \brief Data that is received as part of an ApplicationCommandPermissions update event.
61 OnApplicationCommandPermissionsUpdateData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
62 };
63
64 /// \brief Data that is received as part of an AutoModerationRule creation event.
65 struct DiscordCoreAPI_Dll OnAutoModerationRuleCreationData {
66 AutoModerationRule theRule{};
67 OnAutoModerationRuleCreationData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
68 };
69
70 /// \brief Data that is received as part of an AutoModerationRule update event.
71 struct DiscordCoreAPI_Dll OnAutoModerationRuleUpdateData {
72 AutoModerationRule theRule{};
73 OnAutoModerationRuleUpdateData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
74 };
75
76 /// \brief Data that is received as part of an AutoModerationRule delete event.
77 struct DiscordCoreAPI_Dll OnAutoModerationRuleDeletionData {
78 AutoModerationRule theRule{};
79 OnAutoModerationRuleDeletionData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
80 };
81
82 /// \brief Data that is received as part of an AutoModerationAction execution event.
83 struct DiscordCoreAPI_Dll OnAutoModerationActionExecutionData {
85 OnAutoModerationActionExecutionData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
86 };
87
88 /// \brief Data that is received as part of a Channel creation event.
89 struct DiscordCoreAPI_Dll OnChannelCreationData {
90 std::unique_ptr<ChannelData> channel{ std::make_unique<ChannelData>() };///< The new Channel.
91 OnChannelCreationData(DiscordCoreInternal::WebSocketMessage& message, simdjson::ondemand::value data);
92 OnChannelCreationData& operator=(const OnChannelCreationData& other);
94 };
95
96 /// \brief Data that is received as part of a Channel update event.
97 struct DiscordCoreAPI_Dll OnChannelUpdateData {
98 std::unique_ptr<ChannelData> channel{ std::make_unique<ChannelData>() };///< The new Channel.
99 OnChannelUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
100 OnChannelUpdateData& operator=(const OnChannelUpdateData& other);
102 };
103
104 /// \brief Data that is received as part of a Channel deletion event.
105 struct DiscordCoreAPI_Dll OnChannelDeletionData {
106 std::unique_ptr<ChannelData> channel{ std::make_unique<ChannelData>() };///< The deleted Channel.
107 OnChannelDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
110 };
111
112 /// \brief Data that is received as part of a Channel pins update event.
113 struct DiscordCoreAPI_Dll OnChannelPinsUpdateData {
114 ChannelPinsUpdateEventData dataPackage{};///< The Channel pins update responseData.
115 OnChannelPinsUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
116 };
117
118 /// \brief Data that is received as part of a Thread creation event.
119 struct DiscordCoreAPI_Dll OnThreadCreationData {
120 Thread thread{};///< The new Thread's Channel.
121 OnThreadCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
122 };
123
124 /// \brief Data that is received as part of a Thread update event.
125 struct DiscordCoreAPI_Dll OnThreadUpdateData {
126 Thread thread{};///< The new Thread's Channel.
127 OnThreadUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
128 };
129
130 /// \brief Data that is received as part of a Thread deletion event.
131 struct DiscordCoreAPI_Dll OnThreadDeletionData {
132 Thread thread{};///< The deleted Thread's Channel.
133 OnThreadDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
134 };
135
136 /// \brief Data that is received as part of a Thread list sync event.
137 struct DiscordCoreAPI_Dll OnThreadListSyncData {
138 ThreadListSyncData threadListSyncData{};///< The Thread list sync responseData.
139 OnThreadListSyncData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
140 };
141
142 /// \brief Data that is received as part of a Thread member update event.
143 struct DiscordCoreAPI_Dll OnThreadMemberUpdateData {
144 ThreadMemberData threadMember{};///< Thread member update responseData.
145 OnThreadMemberUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
146 };
147
148 /// \brief Data that is received as part of a Thread members update event.
149 struct DiscordCoreAPI_Dll OnThreadMembersUpdateData {
150 ThreadMembersUpdateData threadMembersUpdateData{};///< Thread member's update responseData.
151 OnThreadMembersUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
152 };
153
154 /// \brief Data that is received as part of a Guild creation event.
155 struct DiscordCoreAPI_Dll OnGuildCreationData {
156 std::unique_ptr<GuildData> guild{ std::make_unique<GuildData>() };///< The new Guild.
157 OnGuildCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
158 OnGuildCreationData& operator=(const OnGuildCreationData&);
160 };
161
162 /// \brief Data that is received as part of a Guild update event.
163 struct DiscordCoreAPI_Dll OnGuildUpdateData {
164 std::unique_ptr<GuildData> guild{ std::make_unique<GuildData>() };///< The new Guild.
165 OnGuildUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
166 OnGuildUpdateData& operator=(const OnGuildUpdateData&);
168 };
169
170 /// \brief Data that is received as part of a Guild deletion event.
171 struct DiscordCoreAPI_Dll OnGuildDeletionData {
172 std::unique_ptr<GuildData> guild{ std::make_unique<GuildData>() };///< The deleted Guild.
173 OnGuildDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
174 OnGuildDeletionData& operator=(const OnGuildDeletionData&);
176 };
177
178 /// \brief Data that is received as part of a Guild ban add event.
179 struct DiscordCoreAPI_Dll OnGuildBanAddData {
180 Snowflake guildId{};///< The Guild they were banned from.
181 User user{};///< The User id of the person who was banned.
182 OnGuildBanAddData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
183 };
184
185 /// \brief Data that is received as part of a Guild ban add event.
186 struct DiscordCoreAPI_Dll OnGuildBanRemoveData {
187 Snowflake guildId{};///< The Guild they were un-banned from.
188 User user{};///< The User id of the person who was un-banned.
189 OnGuildBanRemoveData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
190 };
191
192 /// \brief Data that is received as part of a Guild emojis update event.
193 struct DiscordCoreAPI_Dll OnGuildEmojisUpdateData {
194 GuildEmojisUpdateEventData updateData{};///< The Guild emoji's update responseData.
195 OnGuildEmojisUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
196 };
197
198 /// \brief Data that is received as part of a Guild sticker update event.
199 struct DiscordCoreAPI_Dll OnGuildStickersUpdateData {
200 GuildStickersUpdateEventData updateData{};///< The GuildStickersUpdateEventData.
201 OnGuildStickersUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
202 };
203
204 /// \brief Data that is received as part of a Guild Integration update event.
205 struct DiscordCoreAPI_Dll OnGuildIntegrationsUpdateData {
206 Snowflake guildId{};///< The id of the Guild for which the integrations were updated.
207 OnGuildIntegrationsUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
208 };
209
210 /// \brief Data that is received as part of a GuildMember add event.
211 struct DiscordCoreAPI_Dll OnGuildMemberAddData {
212 std::unique_ptr<GuildMemberData> guildMember{ std::make_unique<GuildMemberData>() };///< The new GuildMember.
213 DiscordCoreClient* discordCoreClient{ nullptr };
214 OnGuildMemberAddData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
215 OnGuildMemberAddData& operator=(const OnGuildMemberAddData&);
216 OnGuildMemberAddData(const OnGuildMemberAddData&);
217 };
218
219 /// \brief Data that is received as part of a GuildMember update event.
220 struct DiscordCoreAPI_Dll OnGuildMemberUpdateData {
221 std::unique_ptr<GuildMemberData> guildMember{ std::make_unique<GuildMemberData>() };///< The new GuildMember.
222 OnGuildMemberUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
225 };
226
227 /// \brief Data that is received as part of a GuildMember remove event.
228 struct DiscordCoreAPI_Dll OnGuildMemberRemoveData {
229 std::unique_ptr<UserData> user{ std::make_unique<UserData>() };///< The User responseData of the removed GuildMember.
230 DiscordCoreClient* discordCoreClient{ nullptr };
231 Snowflake guildId{};///< The id of the Guild from which they were removed.
232 OnGuildMemberRemoveData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient*);
235 };
236
237 /// \brief Data that is received as part of a GuildMembers chunk event.
238 struct DiscordCoreAPI_Dll OnGuildMembersChunkData {
239 GuildMembersChunkEventData chunkEventData{};///< GuildMembersChunkEventData structure.
240 OnGuildMembersChunkData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
241 };
242
243 /// \brief Data that is received as part of a Role creation event.
244 struct DiscordCoreAPI_Dll OnRoleCreationData {
245 std::unique_ptr<RoleData> role{ std::make_unique<RoleData>() };///< The new Role.
246 Snowflake guildId{};///< The id of the Guild within which the Role was created.
247 OnRoleCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
248 OnRoleCreationData& operator=(const OnRoleCreationData&);
250 };
251
252 /// \brief Data that is received as part of a Role update event.
253 struct DiscordCoreAPI_Dll OnRoleUpdateData {
254 std::unique_ptr<RoleData> role{ std::make_unique<RoleData>() };///< The new Role.
255 Snowflake guildId{};///< The id of the Guild within which the Role was updated.
256 OnRoleUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
257 OnRoleUpdateData& operator=(const OnRoleUpdateData&);
259 };
260
261 /// \brief Data that is received as part of a Role deletion event.
262 struct DiscordCoreAPI_Dll OnRoleDeletionData {
263 std::unique_ptr<RoleData> role{ std::make_unique<RoleData>() };///< The deleted Role.
264 Snowflake guildId{};///< The id of the Guild from which the Role was deleted.
265 OnRoleDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
266 OnRoleDeletionData& operator=(const OnRoleDeletionData&);
268 };
269
270 /// \brief Data that is received as part of a GuildScheduledEvent creation event.
271 struct DiscordCoreAPI_Dll OnGuildScheduledEventCreationData {
272 GuildScheduledEventData guildScheduledEvent{};
273 OnGuildScheduledEventCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
274 };
275
276 /// \brief Data that is received as part of a GuildScheduledEvent update event.
277 struct DiscordCoreAPI_Dll OnGuildScheduledEventUpdateData {
278 GuildScheduledEventData guildScheduledEvent{};
279 OnGuildScheduledEventUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
280 };
281
282 /// \brief Data that is received as part of a GuildScheduledEvent delete event.
283 struct DiscordCoreAPI_Dll OnGuildScheduledEventDeletionData {
284 GuildScheduledEventData guildScheduledEvent{};
285 OnGuildScheduledEventDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
286 };
287
288 /// \brief Data that is received as part of a GuildScheduledEvent User add event.
289 struct DiscordCoreAPI_Dll OnGuildScheduledEventUserAddData {
290 Snowflake guildScheduledEventId{};
291 Snowflake guildId{};
292 Snowflake userId{};
293 OnGuildScheduledEventUserAddData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
294 };
295
296 /// \brief Data that is received as part of a GuildScheduledEvent User remove event.
297 struct DiscordCoreAPI_Dll OnGuildScheduledEventUserRemoveData {
298 Snowflake guildScheduledEventId{};
299 Snowflake guildId{};
300 Snowflake userId{};
301 OnGuildScheduledEventUserRemoveData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
302 };
303
304 /// \brief Data that is received as part of an Integration creation event.
305 struct DiscordCoreAPI_Dll OnIntegrationCreationData {
306 IntegrationData integrationData{};///< The new IntegrationData structure.
307 Snowflake guildId{};///< The id of the Guild for which this Integration was created.
308 OnIntegrationCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
309 };
310
311 /// \brief Data that is received as part of an Integration update event.
312 struct DiscordCoreAPI_Dll OnIntegrationUpdateData {
313 IntegrationData integrationData{};///< New IntegrationData structure.
314 Snowflake guildId{};///< The id of the Guild for which the Integration was updated.
315 OnIntegrationUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
316 };
317
318 /// \brief Data that is received as part of an Integration deletion event.
319 struct DiscordCoreAPI_Dll OnIntegrationDeletionData {
320 Snowflake applicationId{};///< Application id of the current application.
321 Snowflake guildId{};///< The id of the Guild for which the Integration was deleted.
322 Snowflake id{};///< The id of the deleted Integration.
323 OnIntegrationDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
324 };
325
326 /// \brief Data that is received as part of an Invite creation event.
327 struct DiscordCoreAPI_Dll OnInviteCreationData {
328 InviteData invite{};///< Thew new InviteData structure.
329 OnInviteCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
330 };
331
332 /// \brief Data that is received as part of an Invite deletion event.
333 struct DiscordCoreAPI_Dll OnInviteDeletionData {
334 Snowflake channelId{};///< The id of the Channel for which the Invite existed.
335 Snowflake guildId{};///< The id of the Guild for which the Invite existed.
336 std::string code{};///< The code of the Invite.
337 OnInviteDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
338 };
339
340 /// \brief Data that is received as part of an Interaction creation event.
341 struct DiscordCoreAPI_Dll OnInteractionCreationData {
342 InteractionData interactionData{};///< The InteractionData representing the Interaction.
343 OnInteractionCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal, DiscordCoreClient* clientPtr);
344 };
345
346 /// \brief Data that is received as part of a Message creation event.
347 struct DiscordCoreAPI_Dll OnMessageCreationData {
348 Message message{};///< The new Message.
349 OnMessageCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
350 };
351
352 /// \brief Data that is received as part of a Message update event.
353 struct DiscordCoreAPI_Dll OnMessageUpdateData {
354 Message messageNew{};///< The new Message.
355 OnMessageUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
356 };
357
358 /// \brief Data that is received as part of a Message deletion event.
359 struct DiscordCoreAPI_Dll OnMessageDeletionData {
360 Snowflake messageId{};///< The id of the Message which was deleted.
361 Snowflake channelId{};///< The id of the Channel from which the Message was deleted.
362 Snowflake guildId{};///< The id of the Guild from which the Message was deleted.
363 OnMessageDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
364 };
365
366 /// \brief Data that is received as part of a Message delete bulk event.
367 struct DiscordCoreAPI_Dll OnMessageDeleteBulkData {
368 std::vector<Snowflake> ids{};///< A vector containing the list of deleted Message ids.
369 Snowflake channelId{};///< The id of the Channel from which the Message was deleted.
370 Snowflake guildId{};///< The id of the Guild from which the Message was deleted.
371 OnMessageDeleteBulkData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
372 };
373
374 /// \brief Data that is received as part of a Reaction add event.
375 struct DiscordCoreAPI_Dll OnReactionAddData {
376 Reaction reaction{};///< The Reaction that was added.
377 OnReactionAddData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
378 };
379
380 /// \brief Data that is received as part of a Reaction remove event.
381 struct DiscordCoreAPI_Dll OnReactionRemoveData {
382 ReactionRemoveData reactionRemoveData{};///< The ReactionRemoveData.
383 OnReactionRemoveData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
384 };
385
386 /// \brief Data that is received as part of a Reaction remove all event.
387 struct DiscordCoreAPI_Dll OnReactionRemoveAllData {
388 Snowflake channelId{};///< The id of the Channel from which the Reactions were deleted.
389 Snowflake messageId{};///< The id of the Message from which the Reactions were deleted.
390 Snowflake guildId{};///< The id of the Guild from which the Reactions were deleted.
391 OnReactionRemoveAllData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
392 };
393
394 /// \brief Data that is received as part of a Reaction remove emoji event.
395 struct DiscordCoreAPI_Dll OnReactionRemoveEmojiData {
396 Snowflake messageId{};///< The id of the Message from which the Reactions were deleted.
397 Snowflake channelId{};///< The id of the Channel from which the Reactions were deleted.
398 Snowflake guildId{};///< The id of the Guild from which the Reactions were deleted.
399 EmojiData emoji{};///< The id of the Emoji which was removed from the Message.
400 OnReactionRemoveEmojiData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
401 };
402
403 /// \brief Data that is received as part of a presence update event.
404 struct DiscordCoreAPI_Dll OnPresenceUpdateData {
405 PresenceUpdateData presenceData{};///< PresenceUpdateData..
406 OnPresenceUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
407 };
408
409 /// \brief Data that is received as part of a StageInstance creation event.
410 struct DiscordCoreAPI_Dll OnStageInstanceCreationData {
411 StageInstanceData stageInstance{};///< The new StageInstanceData.
412 OnStageInstanceCreationData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
413 };
414
415 /// \brief Data that is received as part of a StageInstance update event.
416 struct DiscordCoreAPI_Dll OnStageInstanceUpdateData {
417 StageInstanceData stageInstance{};///< The new StageInstanceData.
418 OnStageInstanceUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
419 };
420
421 /// \brief Data that is received as part of a StageInstance deletion event.
422 struct DiscordCoreAPI_Dll OnStageInstanceDeletionData {
423 StageInstanceData stageInstance{};///< The deleted StageInstanceData.
424 OnStageInstanceDeletionData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
425 };
426
427 /// \brief Data that is received as part of a typing start event.
428 struct DiscordCoreAPI_Dll OnTypingStartData {
429 TypingStartData typingStartData{};///< TypingStartData of the event.
430 OnTypingStartData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
431 };
432
433 /// \brief Data that is received as part of a User update event.
434 struct DiscordCoreAPI_Dll OnUserUpdateData {
435 std::unique_ptr<UserData> user{ std::make_unique<UserData>() };///< The new User.
436 OnUserUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
437 OnUserUpdateData& operator=(const OnUserUpdateData&);
439 };
440
441 /// \brief Data that is received as part of a voice state update event.
442 struct DiscordCoreAPI_Dll OnVoiceStateUpdateData {
443 VoiceStateData voiceStateData{};///< VoiceStateData for the new voice state.
444 OnVoiceStateUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal,
445 DiscordCoreInternal::WebSocketClient* sslShard);
446 };
447
448 /// \brief Data that is received as part of a voice server update event.
449 struct DiscordCoreAPI_Dll OnVoiceServerUpdateData {
450 Snowflake guildId{};///< The id of the Guild for which the server update is occurring.
451 std::string endpoint{};///< The new endpoint.
452 std::string token{};///< The token of the server update event.
453 OnVoiceServerUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal,
454 DiscordCoreInternal::WebSocketClient* sslShard);
455 };
456
457 /// \brief Data that is received as part of a WebHook update event.
458 struct DiscordCoreAPI_Dll OnWebhookUpdateData {
459 Snowflake channelId{};///< Id of the Channel for which the WebHook Update is occurring.
460 Snowflake guildId{};///< Id of the Guild for which the WebHook Update is occurring.
461 OnWebhookUpdateData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
462 };
463
464 /// \brief Data that is received upon the bot receiving an autocomplete entry.
465 struct DiscordCoreAPI_Dll OnAutoCompleteEntryData {
466 InputEventData inputEvent{};///< The input-event representing the autocomplete entry.
467 OnAutoCompleteEntryData(DiscordCoreInternal::WebSocketMessage& data, simdjson::ondemand::value dataReal);
468 };
469
470 /// \brief Class for handling the assignment of event-handling functions.int32_t
471 class DiscordCoreAPI_Dll EventManager {
472 public:
473 /// \brief For adding a function to handle this event.
474 /// \param handler A delegate taking an OnGatewayPingData structure as an argument.
475 /// \returns An event_token for later de-registering the event.
477 /// \brief For removing a function from handling this event.
478 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
480
481 /// \brief For adding a function to handle this event.
482 /// \param handler A delegate taking an OnApplicationCommandPermissionsUpdateData structure as an argument.
483 /// \returns An event_token for later de-registering the event.
484 DiscordCoreInternal::EventDelegateToken onApplicationCommandsPermissionsUpdate(
486 /// \brief For removing a function from handling this event.
487 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
488 void onApplicationCommandsPermissionsUpdate(DiscordCoreInternal::EventDelegateToken& token);
489
490 /// \brief For adding a function to handle this event.
491 /// \param handler A delegate taking an OnAutoModerationRuleCreationData structure as an argument.
492 /// \returns An event_token for later de-registering the event.
493 DiscordCoreInternal::EventDelegateToken onAutoModerationRuleCreation(
495 /// \brief For removing a function from handling this event.
496 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
497 void onAutoModerationRuleCreation(DiscordCoreInternal::EventDelegateToken& token);
498
499 /// \brief For adding a function to handle this event.
500 /// \param handler A delegate taking an OnAutoModerationRuleUpdateData structure as an argument.
501 /// \returns An event_token for later de-registering the event.
502 DiscordCoreInternal::EventDelegateToken onAutoModerationRuleUpdate(
504 /// \brief For removing a function from handling this event.
505 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
506 void onAutoModerationRuleUpdate(DiscordCoreInternal::EventDelegateToken& token);
507
508 /// \brief For adding a function to handle this event.
509 /// \param handler A delegate taking an OnAutoModerationRuleDeletionData structure as an argument.
510 /// \returns An event_token for later de-registering the event.
511 DiscordCoreInternal::EventDelegateToken onAutoModerationRuleDeletion(
513 /// \brief For removing a function from handling this event.
514 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
515 void onAutoModerationRuleDeletion(DiscordCoreInternal::EventDelegateToken& token);
516
517 /// \brief For adding a function to handle this event.
518 /// \param handler A delegate taking an OnAutoModerationActionExecutionData structure as an argument.
519 /// \returns An event_token for later de-registering the event.
520 DiscordCoreInternal::EventDelegateToken onAutoModerationActionExecution(
522 /// \brief For removing a function from handling this event.
523 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
524 void onAutoModerationActionExecution(DiscordCoreInternal::EventDelegateToken& token);
525
526 /// \brief For adding a function to handle this event.
527 /// \param handler A delegate taking an OnInputEventCreationData structure as an argument.
528 /// \returns An event_token for later de-registering the event.
529 DiscordCoreInternal::EventDelegateToken onAutoCompleteEntry(
531 /// \brief For removing a function from handling this event.
532 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
533 void onAutoCompleteEntry(DiscordCoreInternal::EventDelegateToken& token);
534
535 /// \brief For adding a function to handle this event.
536 /// \param handler A delegate taking an OnInputEventCreationData structure as an argument.
537 /// \returns An event_token for later de-registering the event.
538 DiscordCoreInternal::EventDelegateToken onInputEventCreation(
540 /// \brief For removing a function from handling this event.
541 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
542 void onInputEventCreation(DiscordCoreInternal::EventDelegateToken& token);
543
544 /// \brief For adding a function to handle this event.
545 /// \param handler A delegate taking an OnChannelCreationData structure as an argument.
546 /// \returns An event_token for later de-registering the event.
549 /// \brief For removing a function from handling this event.
550 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
551 void onChannelCreation(DiscordCoreInternal::EventDelegateToken& token);
552
553 /// \brief For adding a function to handle this event.
554 /// \param handler A delegate taking an OnChannelUpdateData structure as an argument.
555 /// \returns An event_token for later de-registering the event.
558 /// \brief For removing a function from handling this event.
559 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
560 void onChannelUpdate(DiscordCoreInternal::EventDelegateToken& token);
561
562 /// \brief For adding a function to handle this event.
563 /// \param handler A delegate taking an OnChannelDeletionData structure as an argument.
564 /// \returns An event_token for later de-registering the event.
567 /// \brief For removing a function from handling this event.
568 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
569 void onChannelDeletion(DiscordCoreInternal::EventDelegateToken& token);
570
571 /// \brief For adding a function to handle this event.
572 /// \param handler A delegate taking an OnChannelPinsUpdateData structure as an argument.
573 /// \returns An event_token for later de-registering the event.
574 DiscordCoreInternal::EventDelegateToken onChannelPinsUpdate(
576 /// \brief For removing afunction from handling this event.
577 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
578 void onChannelPinsUpdate(DiscordCoreInternal::EventDelegateToken& token);
579
580 /// \brief For adding a function to handle this event.
581 /// \param handler A delegate taking an OnThreadCreationData structure as an argument.
582 /// \returns An event_token for later de-registering the event.
585 /// \brief For removing a function from handling this event.
586 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
587 void onThreadCreation(DiscordCoreInternal::EventDelegateToken& token);
588
589 /// \brief For adding a function to handle this event.
590 /// \param handler A delegate taking an OnThreadUpdateData structure as an argument.
591 /// \returns An event_token for later de-registering the event.
593 /// \brief For removing a function from handling this event.
594 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
595 void onThreadUpdate(DiscordCoreInternal::EventDelegateToken& token);
596
597 /// \brief For adding a function to handle this event.
598 /// \param handler A delegate taking an OnThreadDeletionData structure as an argument.
599 /// \returns An event_token for later de-registering the event.
602 /// \brief For removing a function from handling this event.
603 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
604 void onThreadDeletion(DiscordCoreInternal::EventDelegateToken& token);
605
606 /// \brief For adding a function to handle this event.
607 /// \param handler A delegate taking an OnThreadListSyncData structure as an argument.
608 /// \returns An event_token for later de-registering the event.
611 /// \brief For removing a function from handling this event.
612 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
613 void onThreadListSync(DiscordCoreInternal::EventDelegateToken& token);
614
615 /// \brief For adding a function to handle this event.
616 /// \param handler A delegate taking an OnThreadMemberUpdateData structure as an argument.
617 /// \returns An event_token for later de-registering the event.
618 DiscordCoreInternal::EventDelegateToken onThreadMemberUpdate(
620 /// \brief For removing a function from handling this event.
621 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
622 void onThreadMemberUpdate(DiscordCoreInternal::EventDelegateToken& token);
623
624 /// \brief For adding a function to handle this event.
625 /// \param handler A delegate taking an OnThreadMembersUpdateData structure as an argument
626 /// \returns An event_token for later de-registering the event.
627 DiscordCoreInternal::EventDelegateToken onThreadMembersUpdate(
629 /// \brief For removing a function from handling this event.
630 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
631 void onThreadMembersUpdate(DiscordCoreInternal::EventDelegateToken& token);
632
633 /// \brief For adding a function to handle this event.
634 /// \param handler A delegate taking an OnGuildCreationData structure as an argument.
635 /// \returns An event_token for later de-registering the event.
638 /// \brief For removing a function from handling this event.
639 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
640 void onGuildCreation(DiscordCoreInternal::EventDelegateToken& token);
641
642 /// \brief For adding a function to handle this event.
643 /// \param handler A delegate taking an OnGuildUpdateData structure as an argument.
644 /// \returns An event_token for later de-registering the event.
646 /// \brief For removing a function from handling this event.
647 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
648 void onGuildUpdate(DiscordCoreInternal::EventDelegateToken& token);
649
650 /// \brief For adding a function to handle this event.
651 /// \param handler A delegate taking an OnGuildDeletionData structure as an argument
652 /// \returns An event_token for later de-registering the event.
655 /// \brief For removing a function from handling this event.
656 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
657 void onGuildDeletion(DiscordCoreInternal::EventDelegateToken& token);
658
659 /// \brief For adding a function to handle this event.
660 /// \param handler A delegate taking an OnGuildBanAddData structure as an argument.
661 /// \returns An event_token for later de-registering the event.
663 /// \brief For removing a function from handling this event.
664 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
665 void onGuildBanAdd(DiscordCoreInternal::EventDelegateToken& token);
666
667 /// \brief For adding a function to handle this event.
668 /// \param handler A delegate taking an OnGuildBanRemoveData structure as an argument.
669 /// \returns An event_token for later de-registering the event.
672 /// \brief For removing a function from handling this event.
673 /// \param token DiscordCoreInternal::EventDelegateToken, from the original event registration.
674 void onGuildBanRemove(DiscordCoreInternal::EventDelegateToken& token);
675
676 /// \brief For adding a function to handle this event.
677 /// \param handler A delegate taking an OnGuildEmojisUpdateData structure as an argument.
678 /// \returns An event_token for later de-registering the event.
679 DiscordCoreInternal::EventDelegateToken onGuildEmojisUpdate(
681 /// \brief For removing a function from handling this event.
682 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
683 void onGuildEmojisUpdate(DiscordCoreInternal::EventDelegateToken& token);
684
685 /// \brief For adding a function to handle this event.
686 /// \param handler A delegate taking an OnGuildStickersUpdateData structure as an argument.
687 /// \returns An event_token for later de-registering the event.
688 DiscordCoreInternal::EventDelegateToken onGuildStickersUpdate(
690 /// \brief For removing a function from handling this event.
691 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
692 void onGuildStickersUpdate(DiscordCoreInternal::EventDelegateToken& token);
693
694 /// \brief For adding a function to handle this event.
695 /// \param handler A delegate taking an OnGuildIntegrationsUpdateData structure as an argument.
696 /// \returns An event_token for later de-registering the event.
697 DiscordCoreInternal::EventDelegateToken onGuildIntegrationsUpdate(
699 /// \brief For removing a function from handling this event.
700 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
701 void onGuildIntegrationsUpdate(DiscordCoreInternal::EventDelegateToken& token);
702
703 /// \brief For adding a function to handle this event.
704 /// \param handler A delegate taking an OnGuildMembersChunkData structure as an argument.
705 /// returns An DiscordCoreInternal::EventDelegateToken, > for later de-registering the event.
706 DiscordCoreInternal::EventDelegateToken onGuildMembersChunk(
708 /// \brief For removing a function from handling this event.
709 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
710 void onGuildMembersChunk(DiscordCoreInternal::EventDelegateToken& token);
711
712 /// \brief For adding a function to handle this event.
713 /// \param handler A delegate taking an OnGuildMemberAddData structure as an argument.
714 /// \returns An event_token for later de-registering the event.
717 /// \brief For removing a function from handling this event.
718 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
719 void onGuildMemberAdd(DiscordCoreInternal::EventDelegateToken& token);
720
721 /// \brief For adding a function to handle this event.
722 /// \param handler A delegate taking an OnGuildMemberRemoveData structure as an argument.
723 /// \returns An event_token for later de-registering the event.
724 DiscordCoreInternal::EventDelegateToken onGuildMemberRemove(
726 /// \brief For removing a function from handling this event.
727 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
728 void onGuildMemberRemove(DiscordCoreInternal::EventDelegateToken& token);
729
730 /// \brief For adding a function to handle this event.
731 /// \param handler A delegate taking an OnGuildMemberUpdateData structure as an argument.
732 /// \returns An event_token for later de-registering the event.
733 DiscordCoreInternal::EventDelegateToken onGuildMemberUpdate(
735 /// \brief For removing a function from handling this event.
736 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
737 void onGuildMemberUpdate(DiscordCoreInternal::EventDelegateToken& token);
738
739 /// \brief For adding a function to handle this event.
740 /// \param handler A delegate taking an OnRoleCreationData structure as an argument.
741 /// \returns An event_token for later de-registering the event.
743 /// \brief For removing a function from handling this event.
744 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
745 void onRoleCreation(DiscordCoreInternal::EventDelegateToken& token);
746
747 /// \brief For adding a function to handle this event.
748 /// \param handler A delegate taking an OnRoleUpdateData structure as an argument
749 /// \returns An event_token for later de-registering the event.
751 /// \brief For removing a function from handling this event.
752 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
753 void onRoleUpdate(DiscordCoreInternal::EventDelegateToken& token);
754
755 /// \brief For adding a function to handle this event.
756 /// \param handler A delegate taking an OnRoleDeletionData structure as an argument.
757 /// \returns An event_token for later de-registering the event.
759 /// \brief For removing a function from handling this event.
760 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
761 void onRoleDeletion(DiscordCoreInternal::EventDelegateToken& token);
762
763 /// \brief For adding a function to handle this event.
764 /// \param handler A delegate taking an OnGuildScheduledEventCreationData structure as an argument.
765 /// \returns An event_token for later de-registering the event.
766 DiscordCoreInternal::EventDelegateToken onGuildScheduledEventCreation(
768 /// \brief For removing a function from handling this event.
769 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
770 void onGuildScheduledEventCreation(DiscordCoreInternal::EventDelegateToken& token);
771
772 /// \brief For adding a function to handle this event.
773 /// \param handler A delegate taking an OnGuildScheduledEventUpdateData structure as an argument.
774 /// \returns An event_token for later de-registering the event.
775 DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUpdate(
777 /// \brief For removing a function from handling this event.
778 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
779 void onGuildScheduledEventUpdate(DiscordCoreInternal::EventDelegateToken& token);
780
781 /// \brief For adding a function to handle this event.
782 /// \param handler A delegate taking an OnGuildScheduledEventDeletionData structure as an argument.
783 /// \returns An event_token for later de-registering the event.
784 DiscordCoreInternal::EventDelegateToken onGuildScheduledEventDeletion(
786 /// \brief For removing a function from handling this event.
787 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
788 void onGuildScheduledEventDeletion(DiscordCoreInternal::EventDelegateToken& token);
789
790 /// \brief For adding a function to handle this event.
791 /// \param handler A delegate taking an OnGuildScheduledEventUserAddData structure as an argument.
792 /// \returns An event_token for later de-registering the event.
793 DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUserAdd(
795 /// \brief For removing a function from handling this event.
796 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
797 void onGuildScheduledEventUserAdd(DiscordCoreInternal::EventDelegateToken& token);
798
799 /// \brief For adding a function to handle this event.
800 /// \param handler A delegate taking an OnGuildScheduledEventUserRemoveData structure as an argument.
801 /// \returns An event_token for later de-registering the event.
802 DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUserRemove(
804 /// \brief For removing a function from handling this event.
805 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
806 void onGuildScheduledEventUserRemove(DiscordCoreInternal::EventDelegateToken& token);
807
808 /// \brief For adding a function to handle this event.
809 /// \param handler A delegate taking an OnIntegrationCreationData structure as an argument.
810 /// \returns An event_token for later de-registering the event.
811 DiscordCoreInternal::EventDelegateToken onIntegrationCreation(
813 /// \brief For removing a function from handling this event.
814 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
815 void onIntegrationCreation(DiscordCoreInternal::EventDelegateToken& token);
816
817 /// \brief For adding a function to handle this event.
818 /// \param handler A delegate taking an OnIntegrationUpdateData structure as an argument.
819 /// \returns An event_token for later de-registering the event.
820 DiscordCoreInternal::EventDelegateToken onIntegrationUpdate(
822 /// \brief For removing a function from handling this event.
823 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
824 void onIntegrationUpdate(DiscordCoreInternal::EventDelegateToken& token);
825
826 /// \brief For adding a function to handle this event.
827 /// \param handler A delegate taking an OnIntegrationDeletionData structure as an argument.
828 /// \returns An event_token for later de-registering the event.
829 DiscordCoreInternal::EventDelegateToken onIntegrationDeletion(
831 /// \brief For removing a function from handling this event.
832 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
833 void onIntegrationDeletion(DiscordCoreInternal::EventDelegateToken& token);
834
835 /// \brief For adding a function to handle this event.
836 /// \param handler A delegate taking an OnInteractionCreationData structure as an argument.
837 /// \returns An event_token for later de-registering the event.
838 DiscordCoreInternal::EventDelegateToken onInteractionCreation(
840 /// \brief For removing a function from handling this event.
841 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
842 void onInteractionCreation(DiscordCoreInternal::EventDelegateToken& token);
843
844 /// \brief For adding a function to handle this event.
845 /// \param handler A delegate taking an OnInviteCreationData structure as an argument.
846 /// \returns An event_token for later de-registering the event.
849 /// \brief For removing a function from handling this event.
850 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
851 void onInviteCreation(DiscordCoreInternal::EventDelegateToken& token);
852
853 /// \brief For adding a function to handle this event.
854 /// \param handler A delegate taking an OnInviteDeletionData structure as an argument.
855 /// \returns An event_token for later de-registering the event.
858 /// \brief For removing a function from handling this event.
859 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
860 void onInviteDeletion(DiscordCoreInternal::EventDelegateToken& token);
861
862 /// \brief For adding a function to handle this event.
863 /// \param handler A delegate taking an OnMessageCreationData structure as an argument.
864 /// \returns An event_token for later de-registering the event.
867 /// \brief For removing a function from handling this event.
868 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
869 void onMessageCreation(DiscordCoreInternal::EventDelegateToken& token);
870
871 /// \brief For adding a function to handle this event.
872 /// \param handler A delegate taking an OnMessageUpdateData structure as an argument.
873 /// \returns An event_token for later de-registering the event.
876 /// \brief For removing a function from handling this event.
877 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
878 void onMessageUpdate(DiscordCoreInternal::EventDelegateToken& token);
879
880 /// \brief For adding a function to handle this event.
881 /// \param handler A delegate taking an OnMessageDeletionData structure as an argument.
882 /// \returns An event_token for later de-registering the event.
885 /// \brief For removing a function from handling this event.
886 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
887 void onMessageDeletion(DiscordCoreInternal::EventDelegateToken& token);
888
889 /// \brief For adding a function to handle this event.
890 /// \param handler A delegate taking an OnMessageDeleteBulkData structure as an argument.
891 /// \returns An event_token for later de-registering the event.
892 DiscordCoreInternal::EventDelegateToken onMessageDeleteBulk(
894 /// \brief For removing a function from handling this event.
895 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
896 void onMessageDeleteBulk(DiscordCoreInternal::EventDelegateToken& token);
897
898 /// \brief For adding a function to handle this event.
899 /// \param handler A delegate taking an OnReactionAddData structure as an argument.
900 /// \returns An event_token for later de-registering the event.
902 /// \brief For removing a function from handling this event.
903 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
904 void onReactionAdd(DiscordCoreInternal::EventDelegateToken& token);
905
906 /// \brief For adding a function to handle this event.
907 /// \param handler A delegate taking an OnReactionRemoveData structure as an argument.
908 /// \returns An event_token for later de-registering the event.
911 /// \brief For removing a function from handling this event.
912 /// \param token An DiscordCoreInternal::EventDelegateToken,from the original event registration.
913 void onReactionRemove(DiscordCoreInternal::EventDelegateToken& token);
914
915 /// \brief For adding a function to handle this event.
916 /// \param handler A delegate taking an OnReactionRemoveAllData structure as an argument.
917 /// \returns An event_token for later de-registering the event.
918 DiscordCoreInternal::EventDelegateToken onReactionRemoveAll(
920 /// \brief For removing a function from handling this event.
921 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
922 void onReactionRemoveAll(DiscordCoreInternal::EventDelegateToken& token);
923
924 /// \brief For adding a function to handle this event.
925 /// \param handler A delegate taking an OnReactionRemoveEmojiData structure as an argument.
926 /// \returns An event_token for later de-registering the event.
927 DiscordCoreInternal::EventDelegateToken onReactionRemoveEmoji(
929 /// \brief For removing a function from handling this event.
930 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
931 void onReactionRemoveEmoji(DiscordCoreInternal::EventDelegateToken& token);
932
933 /// \brief For adding a function to handle this event.
934 /// \param handler A delegate taking an OnPresenceUpdateData structure as an argument.
935 /// \returns An event_token for later de-registering the event.
938 /// \brief For removing a function from handling this event.
939 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
940 void onPresenceUpdate(DiscordCoreInternal::EventDelegateToken& token);
941
942 /// \brief For adding a function to handle this event.
943 /// \param handler A delegate taking an OnStageInstanceCreationData structure as an argument.
944 /// \returns An event_token for later de-registering the event.
945 DiscordCoreInternal::EventDelegateToken onStageInstanceCreation(
947 /// \brief For removing a function from handling this event.
948 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
949 void onStageInstanceCreation(DiscordCoreInternal::EventDelegateToken& token);
950
951 /// \brief For adding a function to handle this event.
952 /// \param handler A delegate taking an OnStageInstanceUpdateData structure as an argument.
953 /// \returns An event_token for later de-registering the event.
954 DiscordCoreInternal::EventDelegateToken onStageInstanceUpdate(
956 /// \brief For removing a function from handling this event.
957 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
958 void onStageInstanceUpdate(DiscordCoreInternal::EventDelegateToken& token);
959
960 /// \brief For adding a function to handle this event.
961 /// \param handler A delegate taking an OnStageInstanceDeletionData structure as an argument.
962 /// \returns An event_token for later de-registering the event.
963 DiscordCoreInternal::EventDelegateToken onStageInstanceDeletion(
965 /// \brief For removing a function from handling this event.
966 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
967 void onStageInstanceDeletion(DiscordCoreInternal::EventDelegateToken& token);
968
969 /// \brief For adding a function to handle this event.
970 /// \param handler A delegate taking an OnTypingStartData structure as an argument.
971 /// \returns An event_token for later de-registering the event.
973 /// \brief For removing a function from handling this event.
974 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
975 void onTypingStart(DiscordCoreInternal::EventDelegateToken& token);
976
977 /// \brief For adding a function to handle this event.
978 /// \param handler A delegate taking an OnUserUpdateData structure as an argument.
979 /// \returns An event_token for later de-registering the event.
981 /// \brief For removing a function from handling this event.
982 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
983 void onUserUpdate(DiscordCoreInternal::EventDelegateToken& token);
984
985 /// \brief For adding a function to handle this event.
986 /// \param handler A delegate taking an OnVoiceStateUpdateData structure as an argument.
987 /// \returns An event_token for later de-registering the event.
990 /// \brief For removing a function from handling this event.
991 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
992 void onVoiceStateUpdate(DiscordCoreInternal::EventDelegateToken& token);
993
994 /// \brief For adding a function to handle this event.
995 /// \param handler A delegate taking an OnVoiceServerUpdateData structure as an argument.
996 /// \returns An event_token for later de-registering the event.
997 DiscordCoreInternal::EventDelegateToken onVoiceServerUpdate(
999 /// \brief For removing a function from handling this event.
1000 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
1001 void onVoiceServerUpdate(DiscordCoreInternal::EventDelegateToken& token);
1002
1003 /// \brief For adding a function to handle this event.
1004 /// \param handler A delegate taking an OnWebhookUpdateData structure as an argument.
1005 /// \returns An event_token for later de-registering the event.
1008 /// \brief For removing a function from handling this event.
1009 /// \param token An DiscordCoreInternal::EventDelegateToken, from the original event registration.
1010 void onWebhookUpdate(DiscordCoreInternal::EventDelegateToken& token);
1011
1012 DiscordCoreInternal::Event<CoRoutine<void>, OnGatewayPingData> onGatewayPingEvent{};
1013
1014 DiscordCoreInternal::Event<CoRoutine<void>, OnApplicationCommandPermissionsUpdateData> onApplicationCommandPermissionsUpdateEvent{};
1015
1016 DiscordCoreInternal::Event<CoRoutine<void>, OnAutoModerationRuleCreationData> onAutoModerationRuleCreationEvent{};
1017
1018 DiscordCoreInternal::Event<CoRoutine<void>, OnAutoModerationRuleUpdateData> onAutoModerationRuleUpdateEvent{};
1019
1020 DiscordCoreInternal::Event<CoRoutine<void>, OnAutoModerationRuleDeletionData> onAutoModerationRuleDeletionEvent{};
1021
1022 DiscordCoreInternal::Event<CoRoutine<void>, OnAutoModerationActionExecutionData> onAutoModerationActionExecutionEvent{};
1023
1024 DiscordCoreInternal::Event<CoRoutine<void>, OnAutoCompleteEntryData> onAutoCompleteEntryEvent{};
1025
1026 DiscordCoreInternal::Event<CoRoutine<void>, OnInputEventCreationData> onInputEventCreationEvent{};
1027
1028 DiscordCoreInternal::Event<CoRoutine<void>, OnChannelCreationData> onChannelCreationEvent{};
1029
1030 DiscordCoreInternal::Event<CoRoutine<void>, OnChannelUpdateData> onChannelUpdateEvent{};
1031
1032 DiscordCoreInternal::Event<CoRoutine<void>, OnChannelDeletionData> onChannelDeletionEvent{};
1033
1034 DiscordCoreInternal::Event<CoRoutine<void>, OnChannelPinsUpdateData> onChannelPinsUpdateEvent{};
1035
1036 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadCreationData> onThreadCreationEvent{};
1037
1038 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadUpdateData> onThreadUpdateEvent{};
1039
1040 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadDeletionData> onThreadDeletionEvent{};
1041
1042 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadListSyncData> onThreadListSyncEvent{};
1043
1044 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadMemberUpdateData> onThreadMemberUpdateEvent{};
1045
1046 DiscordCoreInternal::Event<CoRoutine<void>, OnThreadMembersUpdateData> onThreadMembersUpdateEvent{};
1047
1048 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildCreationData> onGuildCreationEvent{};
1049
1050 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildUpdateData> onGuildUpdateEvent{};
1051
1052 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildDeletionData> onGuildDeletionEvent{};
1053
1054 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildBanAddData> onGuildBanAddEvent{};
1055
1056 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildBanRemoveData> onGuildBanRemoveEvent{};
1057
1058 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildEmojisUpdateData> onGuildEmojisUpdateEvent{};
1059
1060 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildStickersUpdateData> onGuildStickersUpdateEvent{};
1061
1062 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildIntegrationsUpdateData> onGuildIntegrationsUpdateEvent{};
1063
1064 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildMemberAddData> onGuildMemberAddEvent{};
1065
1066 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildMemberRemoveData> onGuildMemberRemoveEvent{};
1067
1068 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildMemberUpdateData> onGuildMemberUpdateEvent{};
1069
1070 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildMembersChunkData> onGuildMembersChunkEvent{};
1071
1072 DiscordCoreInternal::Event<CoRoutine<void>, OnRoleCreationData> onRoleCreationEvent{};
1073
1074 DiscordCoreInternal::Event<CoRoutine<void>, OnRoleUpdateData> onRoleUpdateEvent{};
1075
1076 DiscordCoreInternal::Event<CoRoutine<void>, OnRoleDeletionData> onRoleDeletionEvent{};
1077
1078 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildScheduledEventCreationData> onGuildScheduledEventCreationEvent{};
1079
1080 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildScheduledEventUpdateData> onGuildScheduledEventUpdateEvent{};
1081
1082 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildScheduledEventDeletionData> onGuildScheduledEventDeletionEvent{};
1083
1084 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildScheduledEventUserAddData> onGuildScheduledEventUserAddEvent{};
1085
1086 DiscordCoreInternal::Event<CoRoutine<void>, OnGuildScheduledEventUserRemoveData> onGuildScheduledEventUserRemoveEvent{};
1087
1088 DiscordCoreInternal::Event<CoRoutine<void>, OnIntegrationCreationData> onIntegrationCreationEvent{};
1089
1090 DiscordCoreInternal::Event<CoRoutine<void>, OnIntegrationUpdateData> onIntegrationUpdateEvent{};
1091
1092 DiscordCoreInternal::Event<CoRoutine<void>, OnIntegrationDeletionData> onIntegrationDeletionEvent{};
1093
1094 DiscordCoreInternal::Event<CoRoutine<void>, OnInteractionCreationData> onInteractionCreationEvent{};
1095
1096 DiscordCoreInternal::Event<CoRoutine<void>, OnInviteCreationData> onInviteCreationEvent{};
1097
1098 DiscordCoreInternal::Event<CoRoutine<void>, OnInviteDeletionData> onInviteDeletionEvent{};
1099
1100 DiscordCoreInternal::Event<CoRoutine<void>, OnMessageCreationData> onMessageCreationEvent{};
1101
1102 DiscordCoreInternal::Event<CoRoutine<void>, OnMessageUpdateData> onMessageUpdateEvent{};
1103
1104 DiscordCoreInternal::Event<CoRoutine<void>, OnMessageDeletionData> onMessageDeletionEvent{};
1105
1106 DiscordCoreInternal::Event<CoRoutine<void>, OnMessageDeleteBulkData> onMessageDeleteBulkEvent{};
1107
1108 DiscordCoreInternal::Event<CoRoutine<void>, OnReactionAddData> onReactionAddEvent{};
1109
1110 DiscordCoreInternal::Event<CoRoutine<void>, OnReactionRemoveData> onReactionRemoveEvent{};
1111
1112 DiscordCoreInternal::Event<CoRoutine<void>, OnReactionRemoveAllData> onReactionRemoveAllEvent{};
1113
1114 DiscordCoreInternal::Event<CoRoutine<void>, OnReactionRemoveEmojiData> onReactionRemoveEmojiEvent{};
1115
1116 DiscordCoreInternal::Event<CoRoutine<void>, OnPresenceUpdateData> onPresenceUpdateEvent{};
1117
1118 DiscordCoreInternal::Event<CoRoutine<void>, OnStageInstanceCreationData> onStageInstanceCreationEvent{};
1119
1120 DiscordCoreInternal::Event<CoRoutine<void>, OnStageInstanceUpdateData> onStageInstanceUpdateEvent{};
1121
1122 DiscordCoreInternal::Event<CoRoutine<void>, OnStageInstanceDeletionData> onStageInstanceDeletionEvent{};
1123
1124 DiscordCoreInternal::Event<CoRoutine<void>, OnTypingStartData> onTypingStartEvent{};
1125
1126 DiscordCoreInternal::Event<CoRoutine<void>, OnUserUpdateData> onUserUpdateEvent{};
1127
1128 DiscordCoreInternal::Event<CoRoutine<void>, OnVoiceStateUpdateData> onVoiceStateUpdateEvent{};
1129
1130 DiscordCoreInternal::Event<CoRoutine<void>, OnVoiceServerUpdateData> onVoiceServerUpdateEvent{};
1131
1132 DiscordCoreInternal::Event<CoRoutine<void>, OnWebhookUpdateData> onWebhookUpdateEvent{};
1133 };
1134 /**@}*/
1135
1136}// namespace DiscordCoreAPI
The main namespace for this library.
For when an auto-moderation-rule is executed.
Represents an auto-moderation-rule.
A CoRoutine - representing a potentially asynchronous operation/function.
Definition: CoRoutine.hpp:59
DiscordCoreClient - The main class for this library.
Event-delegate token, representing an event.
Event-delegate, for representing an event-function to be executed.
Data that is received as part of a Gateway ping event.
Data that is received as part of an InputEvent creation event.
Data that is received as part of an ApplicationCommandPermissions update event.
Data that is received as part of an AutoModerationRule creation event.
Data that is received as part of an AutoModerationRule update event.
Data that is received as part of an AutoModerationRule delete event.
Data that is received as part of an AutoModerationAction execution event.
Data that is received as part of a Channel creation event.
Data that is received as part of a Channel update event.
Data that is received as part of a Channel deletion event.
Data that is received as part of a Channel pins update event.
Data that is received as part of a Thread creation event.
Data that is received as part of a Thread update event.
Data that is received as part of a Thread deletion event.
Data that is received as part of a Thread list sync event.
Data that is received as part of a Thread member update event.
Data that is received as part of a Thread members update event.
Data that is received as part of a Guild creation event.
Data that is received as part of a Guild update event.
Data that is received as part of a Guild deletion event.
Data that is received as part of a Guild ban add event.
Data that is received as part of a Guild ban add event.
Data that is received as part of a Guild emojis update event.
Data that is received as part of a Guild sticker update event.
Data that is received as part of a Guild Integration update event.
Data that is received as part of a GuildMember add event.
Data that is received as part of a GuildMember update event.
Data that is received as part of a GuildMember remove event.
Data that is received as part of a GuildMembers chunk event.
Data that is received as part of a Role creation event.
Data that is received as part of a Role update event.
Data that is received as part of a Role deletion event.
Data that is received as part of a GuildScheduledEvent creation event.
Data that is received as part of a GuildScheduledEvent update event.
Data that is received as part of a GuildScheduledEvent delete event.
Data that is received as part of a GuildScheduledEvent User add event.
Data that is received as part of a GuildScheduledEvent User remove event.
Data that is received as part of an Integration creation event.
Data that is received as part of an Integration update event.
Data that is received as part of an Integration deletion event.
Data that is received as part of an Invite creation event.
Data that is received as part of an Invite deletion event.
Data that is received as part of an Interaction creation event.
Data that is received as part of a Message creation event.
Data that is received as part of a Message update event.
Data that is received as part of a Message deletion event.
Data that is received as part of a Message delete bulk event.
Data that is received as part of a Reaction add event.
Data that is received as part of a Reaction remove event.
Data that is received as part of a Reaction remove all event.
Data that is received as part of a Reaction remove emoji event.
Data that is received as part of a presence update event.
Data that is received as part of a StageInstance creation event.
Data that is received as part of a StageInstance update event.
Data that is received as part of a StageInstance deletion event.
Data that is received as part of a typing start event.
Data that is received as part of a User update event.
Data that is received as part of a voice state update event.
Data that is received as part of a voice server update event.
Data that is received as part of a WebHook update event.
Data that is received upon the bot receiving an autocomplete entry.
Class for handling the assignment of event-handling functions.int32_t.
DiscordCoreInternal::EventDelegateToken onGatewayPing(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGatewayPingData > handler)
For adding a function to handle this event.
void onGatewayPing(DiscordCoreInternal::EventDelegateToken &token)
For removing a function from handling this event.
Data for a single member of a Thread.
Data structure representing a single emoji.
Represents the Permissions for accessing an ApplicationCommand from within a Guild.
Data representing a Guild Scheduled Event.
Representing "TypingStart" data.
Data for when some Channel pins are updated.
Data for when threads are synced.
Represents a Thread-members-update.
Data representing a Guild Emoji Update event.
Data representing a Guild Stickers Update event.
Data representing an input-event, which is any Message or Interaction that is coming into the bot as ...
Represents a single Thread.
A single User.