33 OnInputEventCreationData::OnInputEventCreationData(DiscordCoreInternal::WebSocketMessage& message, Value data) {
34 this->
inputEventData = message.processJsonMessage<InputEventData>(std::move(data),
"d");
37 OnApplicationCommandPermissionsUpdateData::OnApplicationCommandPermissionsUpdateData(DiscordCoreInternal::WebSocketMessage& message,
39 this->permissionData = message.processJsonMessage<GuildApplicationCommandPermissionsData>(std::move(data),
"d");
42 OnAutoModerationRuleCreationData::OnAutoModerationRuleCreationData(DiscordCoreInternal::WebSocketMessage& message, Value data) {
43 this->theRule = message.processJsonMessage<AutoModerationRule>(std::move(data),
"d");
46 OnAutoModerationRuleUpdateData::OnAutoModerationRuleUpdateData(DiscordCoreInternal::WebSocketMessage& message, Value data) {
47 this->theRule = message.processJsonMessage<AutoModerationRule>(std::move(data),
"d");
50 OnAutoModerationRuleDeletionData::OnAutoModerationRuleDeletionData(DiscordCoreInternal::WebSocketMessage& message, Value data) {
51 this->theRule = message.processJsonMessage<AutoModerationRule>(std::move(data),
"d");
54 OnAutoModerationActionExecutionData::OnAutoModerationActionExecutionData(DiscordCoreInternal::WebSocketMessage& message, Value data) {
55 this->data = message.processJsonMessage<AutoModerationActionExecutionEventData>(std::move(data),
"d");
58 OnChannelCreationData::OnChannelCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
59 this->
channel = std::make_unique<ChannelData>(data.processJsonMessage<ChannelData>(std::move(dataReal),
"d"));
60 if (Channels::doWeCacheChannels()) {
62 guild.id = this->
channel->guildId;
63 if (Guilds::getCache().contains(guild)) {
64 Guilds::getCache()[guild].channels.emplace_back(this->
channel->id);
66 if (Channels::doWeCacheChannels()) {
67 Channels::insertChannel(*this->
channel);
72 OnChannelCreationData& OnChannelCreationData::operator=(
const OnChannelCreationData& other) {
73 *this->
channel = *other.channel;
77 OnChannelCreationData::OnChannelCreationData(
const OnChannelCreationData& other) {
81 OnChannelUpdateData::OnChannelUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
82 this->
channel = std::make_unique<ChannelData>(data.processJsonMessage<ChannelData>(std::move(dataReal),
"d"));
83 if (Channels::doWeCacheChannels()) {
84 Channels::insertChannel(*this->
channel);
88 OnChannelUpdateData& OnChannelUpdateData::operator=(
const OnChannelUpdateData& other) {
89 *this->
channel = *other.channel;
93 OnChannelUpdateData::OnChannelUpdateData(
const OnChannelUpdateData& other) {
97 OnChannelDeletionData::OnChannelDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
98 this->
channel = std::make_unique<ChannelData>(data.processJsonMessage<ChannelData>(std::move(dataReal),
"d"));
99 if (Channels::doWeCacheChannels()) {
101 guild.id = this->
channel->guildId;
102 if (Guilds::getCache().contains(guild)) {
103 for (uint64_t x = 0; x < Guilds::getCache()[guild].channels.size(); ++x) {
104 if (Guilds::getCache()[guild].channels[x] == this->
channel->id) {
105 Guilds::getCache()[guild].channels.erase(Guilds::getCache()[guild].channels.begin() + x);
109 if (Channels::doWeCacheChannels()) {
110 Channels::removeChannel(this->
channel->id);
115 OnChannelDeletionData& OnChannelDeletionData::operator=(
const OnChannelDeletionData& other) {
116 *this->
channel = *other.channel;
120 OnChannelDeletionData::OnChannelDeletionData(
const OnChannelDeletionData& other) {
124 OnChannelPinsUpdateData::OnChannelPinsUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
125 this->
dataPackage = data.processJsonMessage<ChannelPinsUpdateEventData>(std::move(dataReal),
"d");
128 OnThreadCreationData::OnThreadCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
129 this->
thread = data.processJsonMessage<Thread>(std::move(dataReal),
"d");
132 if (Guilds::getCache().contains(guild)) {
133 Guilds::getCache()[guild].threads.emplace_back(this->
thread.
id);
137 OnThreadUpdateData::OnThreadUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
138 this->
thread = data.processJsonMessage<Thread>(std::move(dataReal),
"d");
141 OnThreadDeletionData::OnThreadDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
142 this->
thread = data.processJsonMessage<Thread>(std::move(dataReal),
"d");
145 if (Guilds::getCache().contains(guild)) {
146 for (uint64_t x = 0; x < Guilds::getCache()[guild].threads.size(); ++x) {
147 if (Guilds::getCache()[guild].threads[x] == this->
thread.
id) {
148 Guilds::getCache()[guild].threads.erase(Guilds::getCache()[guild].threads.begin() + x);
154 OnThreadListSyncData::OnThreadListSyncData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
155 this->
threadListSyncData = data.processJsonMessage<ThreadListSyncData>(std::move(dataReal),
"d");
158 OnThreadMemberUpdateData::OnThreadMemberUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
159 this->
threadMember = data.processJsonMessage<ThreadMemberData>(std::move(dataReal),
"d");
162 OnThreadMembersUpdateData::OnThreadMembersUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
166 OnGuildCreationData::OnGuildCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal, DiscordCoreClient* client) {
167 this->
guild = std::make_unique<GuildData>(data.processJsonMessage<GuildData>(std::move(dataReal),
"d"));
168 this->
guild->discordCoreClient = client;
169 if (Guilds::doWeCacheGuilds()) {
170 if (Guilds::doWeCacheGuilds()) {
171 Guilds::insertGuild(*this->
guild);
176 OnGuildCreationData& OnGuildCreationData::operator=(
const OnGuildCreationData& other) {
177 *this->
guild = *other.guild;
181 OnGuildCreationData::OnGuildCreationData(
const OnGuildCreationData& other) {
185 OnGuildUpdateData::OnGuildUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal, DiscordCoreClient* clientNew) {
186 this->
guild = std::make_unique<GuildData>(data.processJsonMessage<GuildData>(std::move(dataReal),
"d"));
187 this->
guild->discordCoreClient = clientNew;
188 if (Guilds::doWeCacheGuilds()) {
189 Guilds::insertGuild(*this->
guild);
193 OnGuildUpdateData& OnGuildUpdateData::operator=(
const OnGuildUpdateData& other) {
194 *this->
guild = *other.guild;
198 OnGuildUpdateData::OnGuildUpdateData(
const OnGuildUpdateData& other) {
202 OnGuildDeletionData::OnGuildDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal, DiscordCoreClient* clientNew) {
203 this->
guild = std::make_unique<GuildData>(data.processJsonMessage<GuildData>(std::move(dataReal),
"d"));
204 if (Guilds::doWeCacheGuilds()) {
205 Guilds::removeGuild(this->
guild->id);
207 for (
auto& valueNew: this->
guild->members) {
209 GuildMembers::removeGuildMember(guildMember);
211 for (
auto& valueNew: this->
guild->channels) {
212 Channels::removeChannel(valueNew);
214 for (
auto& valueNew: this->
guild->roles) {
215 Roles::removeRole(valueNew);
219 OnGuildDeletionData& OnGuildDeletionData::operator=(
const OnGuildDeletionData& other) {
220 *this->
guild = *other.guild;
224 OnGuildDeletionData::OnGuildDeletionData(
const OnGuildDeletionData& other) {
228 OnGuildBanAddData::OnGuildBanAddData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
229 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
230 this->
user = data.processJsonMessage<UserData>(dataReal[
"d"].value(),
"user");
233 OnGuildBanRemoveData::OnGuildBanRemoveData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
234 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
235 this->
user = data.processJsonMessage<UserData>(dataReal[
"d"].value(),
"user");
238 OnGuildEmojisUpdateData::OnGuildEmojisUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
239 this->
updateData = data.processJsonMessage<GuildEmojisUpdateEventData>(std::move(dataReal),
"d");
242 if (Guilds::getCache().contains(guild)) {
243 Guilds::getCache()[guild].emoji.clear();
244 for (
auto& valueNew: this->
updateData.emojis) {
245 Guilds::getCache()[guild].emoji.emplace_back(valueNew.id);
250 OnGuildStickersUpdateData::OnGuildStickersUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
251 this->
updateData = data.processJsonMessage<GuildStickersUpdateEventData>(std::move(dataReal),
"d");
254 if (Guilds::getCache().contains(guild)) {
255 Guilds::getCache()[guild].stickers.clear();
256 for (
auto& valueNew: this->
updateData.stickers) {
257 Guilds::getCache()[guild].stickers.emplace_back(valueNew.id);
262 OnGuildIntegrationsUpdateData::OnGuildIntegrationsUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
263 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
266 OnGuildMemberAddData::OnGuildMemberAddData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal, DiscordCoreClient* client) {
267 this->guildMember = std::make_unique<GuildMemberData>(data.processJsonMessage<GuildMemberData>(std::move(dataReal),
"d"));
268 this->discordCoreClient = client;
269 if (GuildMembers::doWeCacheGuildMembers()) {
270 GuildMembers::insertGuildMember(*this->guildMember);
273 if (Guilds::getCache().contains(guild)) {
274 ++Guilds::getCache()[guild].memberCount;
279 OnGuildMemberAddData& OnGuildMemberAddData::operator=(
const OnGuildMemberAddData& other) {
280 this->discordCoreClient = other.discordCoreClient;
281 *this->guildMember = *other.guildMember;
285 OnGuildMemberAddData::OnGuildMemberAddData(
const OnGuildMemberAddData& other) {
289 OnGuildMemberRemoveData::OnGuildMemberRemoveData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal,
290 DiscordCoreClient* client) {
291 this->discordCoreClient = client;
292 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
293 this->
user = std::make_unique<UserData>(data.processJsonMessage<UserData>(dataReal[
"d"].value(),
"user"));
295 if (GuildMembers::doWeCacheGuildMembers()) {
298 GuildMembers::removeGuildMember(guildMember);
299 if (Guilds::getCache().contains(guild)) {
300 for (uint64_t x = 0; x < Guilds::getCache()[guild].members.size(); ++x) {
301 if (Guilds::getCache()[guild].members[x] == this->
user->id) {
302 --Guilds::getCache()[guild].memberCount;
303 Guilds::getCache()[guild].members.erase(Guilds::getCache()[guild].members.begin() + x);
310 OnGuildMemberRemoveData& OnGuildMemberRemoveData::operator=(
const OnGuildMemberRemoveData& other) {
311 this->discordCoreClient = other.discordCoreClient;
313 *this->
user = *other.user;
317 OnGuildMemberRemoveData::OnGuildMemberRemoveData(
const OnGuildMemberRemoveData& other) {
321 OnGuildMemberUpdateData::OnGuildMemberUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal,
322 DiscordCoreClient* client) {
323 this->guildMember = std::make_unique<GuildMemberData>(data.processJsonMessage<GuildMemberData>(std::move(dataReal),
"d"));
324 if (GuildMembers::doWeCacheGuildMembers()) {
325 GuildMembers::insertGuildMember(*this->guildMember);
329 OnGuildMemberUpdateData& OnGuildMemberUpdateData::operator=(
const OnGuildMemberUpdateData& other) {
330 *this->guildMember = *other.guildMember;
334 OnGuildMemberUpdateData::OnGuildMemberUpdateData(
const OnGuildMemberUpdateData& other) {
338 OnGuildMembersChunkData::OnGuildMembersChunkData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
339 this->
chunkEventData = data.processJsonMessage<GuildMembersChunkEventData>(std::move(dataReal),
"d");
342 OnRoleCreationData::OnRoleCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
343 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
344 this->
role = std::make_unique<RoleData>(data.processJsonMessage<RoleData>(dataReal[
"d"].value(),
"role"));
347 if (Guilds::getCache().contains(guild)) {
348 Guilds::getCache()[guild].roles.emplace_back(this->
role->id);
350 if (Roles::doWeCacheRoles()) {
351 Roles::insertRole(*this->
role);
355 OnRoleCreationData& OnRoleCreationData::operator=(
const OnRoleCreationData& other) {
357 *this->
role = *other.role;
361 OnRoleCreationData::OnRoleCreationData(
const OnRoleCreationData& other) {
365 OnRoleUpdateData::OnRoleUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
366 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
367 this->
role = std::make_unique<RoleData>(data.processJsonMessage<RoleData>(dataReal[
"d"].value(),
"role"));
368 if (Roles::doWeCacheRoles()) {
369 Roles::insertRole(*this->
role);
373 OnRoleUpdateData& OnRoleUpdateData::operator=(
const OnRoleUpdateData& other) {
375 *this->
role = *other.role;
379 OnRoleUpdateData::OnRoleUpdateData(
const OnRoleUpdateData& other) {
383 OnRoleDeletionData::OnRoleDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
384 this->
role->id = getId(dataReal[
"d"].value(),
"role_id");
385 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
389 if (Roles::doWeCacheRoles()) {
390 Roles::removeRole(this->
role->id);
391 if (Guilds::getCache().contains(guild)) {
392 for (uint64_t x = 0; x < Guilds::getCache()[guild].roles.size(); ++x) {
393 if (Guilds::getCache()[guild].roles[x] == this->
role->id) {
394 Guilds::getCache()[guild].roles.erase(Guilds::getCache()[guild].roles.begin() + x);
401 OnRoleDeletionData& OnRoleDeletionData::operator=(
const OnRoleDeletionData& other) {
403 *this->
role = *other.role;
407 OnRoleDeletionData::OnRoleDeletionData(
const OnRoleDeletionData& other) {
411 OnUserUpdateData& OnUserUpdateData::operator=(
const OnUserUpdateData& other) {
412 *this->
user = *other.user;
416 OnUserUpdateData::OnUserUpdateData(
const OnUserUpdateData& other) {
420 OnVoiceServerUpdateData::OnVoiceServerUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal,
421 DiscordCoreInternal::WebSocketClient* sslShard) {
422 this->
endpoint = getString(dataReal[
"d"].value(),
"endpoint");
423 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
424 this->
token = getString(dataReal[
"d"].value(),
"token");
425 sslShard->voiceConnectionData.endPoint = this->
endpoint;
426 sslShard->voiceConnectionData.token = this->
token;
427 if (sslShard->areWeCollectingData && !sslShard->serverUpdateCollected && !sslShard->stateUpdateCollected) {
428 sslShard->voiceConnectionData = DiscordCoreInternal::VoiceConnectionData{};
429 sslShard->serverUpdateCollected =
true;
430 }
else if (sslShard->areWeCollectingData && !sslShard->serverUpdateCollected) {
431 if (sslShard->voiceConnectionDataBuffersMap.contains(this->guildId.operator
size_t())) {
432 sslShard->voiceConnectionDataBuffersMap[this->
guildId.operator size_t()]->send(sslShard->voiceConnectionData);
434 sslShard->serverUpdateCollected =
false;
435 sslShard->stateUpdateCollected =
false;
436 sslShard->areWeCollectingData =
false;
440 OnGuildScheduledEventCreationData::OnGuildScheduledEventCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
441 this->guildScheduledEvent = data.processJsonMessage<GuildScheduledEventData>(std::move(dataReal),
"d");
443 guild.
id = this->guildScheduledEvent.
guildId;
444 if (Guilds::getCache().contains(guild)) {
445 Guilds::getCache()[guild].guildScheduledEvents.emplace_back(this->guildScheduledEvent.
id);
449 OnGuildScheduledEventUpdateData::OnGuildScheduledEventUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
450 this->guildScheduledEvent = data.processJsonMessage<GuildScheduledEventData>(std::move(dataReal),
"d");
453 OnGuildScheduledEventDeletionData::OnGuildScheduledEventDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
454 this->guildScheduledEvent = data.processJsonMessage<GuildScheduledEventData>(std::move(dataReal),
"d");
456 guild.
id = this->guildScheduledEvent.
guildId;
457 if (Guilds::getCache().contains(guild)) {
458 for (uint64_t x = 0; x < Guilds::getCache()[guild].guildScheduledEvents.size(); ++x) {
459 if (Guilds::getCache()[guild].guildScheduledEvents[x] == this->guildScheduledEvent.
id) {
460 Guilds::getCache()[guild].guildScheduledEvents.erase(Guilds::getCache()[guild].guildScheduledEvents.begin() + x);
466 OnGuildScheduledEventUserAddData::OnGuildScheduledEventUserAddData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
467 this->guildScheduledEventId = getId(dataReal[
"d"].value(),
"guild_scheduled_event_id");
468 this->guildId = getId(dataReal[
"d"].value(),
"guild_id");
469 this->userId = getId(dataReal[
"d"].value(),
"user_id");
472 OnGuildScheduledEventUserRemoveData::OnGuildScheduledEventUserRemoveData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
473 this->guildScheduledEventId = getId(dataReal[
"d"].value(),
"guild_scheduled_event_id");
474 this->guildId = getId(dataReal[
"d"].value(),
"guild_id");
475 this->userId = getId(dataReal[
"d"].value(),
"user_id");
478 OnIntegrationCreationData::OnIntegrationCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
479 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
481 if (dataReal[
"d"][
"integration"].get(objectNew) == ErrorCode::Success) {
486 OnIntegrationUpdateData::OnIntegrationUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
487 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
489 if (dataReal[
"d"][
"integration"].get(objectNew) == ErrorCode::Success) {
494 OnIntegrationDeletionData::OnIntegrationDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
495 this->
applicationId = getId(dataReal[
"d"].value(),
"application_id");
496 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
497 this->
id = getId(dataReal[
"d"].value(),
"id");
500 OnInteractionCreationData::OnInteractionCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal,
501 DiscordCoreClient* clientPtr) {
502 this->
interactionData = InteractionData{ data.processJsonMessage<InteractionData>(std::move(dataReal),
"d") };
503 std::unique_ptr<InputEventData> eventData{ std::make_unique<InputEventData>(
interactionData) };
508 std::unique_ptr<CommandData> commandData{ std::make_unique<CommandData>(*eventData) };
509 commandData->discordCoreClient = eventData->getGuildData().discordCoreClient;
510 clientPtr->getCommandController().checkForAndRunCommand(*commandData);
511 std::unique_ptr<OnInputEventCreationData> eventCreationData{ std::make_unique<OnInputEventCreationData>(data,
512 std::move(dataReal)) };
513 eventCreationData->inputEventData = *eventData;
521 if (ButtonCollector::buttonInteractionBuffersMap.contains(
522 eventData->getChannelData().id + eventData->getMessageData().id)) {
523 ButtonCollector::buttonInteractionBuffersMap[eventData->getChannelData().id + eventData->getMessageData().id]
526 ButtonCollector::buttonInteractionEventsMap.operator()(*eventData->interactionData);
536 if (SelectMenuCollector::selectMenuInteractionBuffersMap.contains(
537 eventData->getChannelData().id + eventData->getMessageData().id)) {
538 SelectMenuCollector::selectMenuInteractionBuffersMap[eventData->getChannelData().id +
539 eventData->getMessageData().id]
542 SelectMenuCollector::selectMenuInteractionEventsMap.operator()(*eventData->interactionData);
551 std::unique_ptr<OnInputEventCreationData> eventCreationData{ std::make_unique<OnInputEventCreationData>(data,
552 std::move(dataReal)) };
553 eventCreationData->inputEventData = *eventData;
554 if (ModalCollector::modalInteractionBuffersMap.contains(eventData->getChannelData().id)) {
555 ModalCollector::modalInteractionBuffersMap[eventData->getChannelData().id]->send(eventData->getInteractionData());
556 ModalCollector::modalInteractionEventsMap.operator()(*eventData->interactionData);
563 std::unique_ptr<OnAutoCompleteEntryData> autocompleteEntryData{ std::make_unique<OnAutoCompleteEntryData>(data,
564 std::move(dataReal)) };
565 autocompleteEntryData->inputEvent = *eventData;
566 clientPtr->getEventManager().onAutoCompleteEntryEvent(*autocompleteEntryData);
572 OnInviteCreationData::OnInviteCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
573 this->
invite = data.processJsonMessage<InviteData>(std::move(dataReal),
"d");
576 OnInviteDeletionData::OnInviteDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
577 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
578 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
579 this->
code = getId(dataReal[
"d"].value(),
"code");
582 OnMessageCreationData::OnMessageCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
583 this->
message = data.processJsonMessage<
Message>(std::move(dataReal),
"d");
584 for (
auto& [key, dValue]: MessageCollector::objectsBuffersMap) {
589 OnMessageUpdateData::OnMessageUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
591 for (
auto& [key, dValue]: MessageCollector::objectsBuffersMap) {
596 OnMessageDeletionData::OnMessageDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
597 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
598 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
599 this->
messageId = getId(dataReal[
"d"].value(),
"id");
602 OnMessageDeleteBulkData::OnMessageDeleteBulkData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
603 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
604 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
606 if (dataReal[
"d"][
"ids"].get(arrayValue) == ErrorCode::Success) {
607 for (
auto dValue: arrayValue) {
608 this->
ids.emplace_back(strtoull(dValue.getString().value()));
613 OnReactionAddData::OnReactionAddData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
614 this->
reaction = data.processJsonMessage<Reaction>(std::move(dataReal),
"d");
617 OnReactionRemoveData::OnReactionRemoveData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
618 this->
reactionRemoveData = data.processJsonMessage<ReactionRemoveData>(std::move(dataReal),
"d");
621 OnReactionRemoveAllData::OnReactionRemoveAllData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
622 this->
messageId = getId(dataReal[
"d"].value(),
"message_id");
623 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
624 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
627 OnReactionRemoveEmojiData::OnReactionRemoveEmojiData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
628 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
629 this->
messageId = getId(dataReal[
"d"].value(),
"message_id");
630 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
632 if (dataReal[
"d"][
"emoji"].get(objectNew) == ErrorCode::Success) {
633 this->
emoji = EmojiData{ objectNew };
637 OnPresenceUpdateData::OnPresenceUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
638 this->
presenceData = data.processJsonMessage<PresenceUpdateData>(std::move(dataReal),
"d");
641 OnStageInstanceCreationData::OnStageInstanceCreationData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
642 this->
stageInstance = data.processJsonMessage<StageInstance>(std::move(dataReal),
"d");
645 if (Guilds::getCache().contains(guild)) {
646 Guilds::getCache()[guild].stageInstances.emplace_back(this->
stageInstance.
id);
650 OnStageInstanceUpdateData::OnStageInstanceUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
651 this->
stageInstance = data.processJsonMessage<StageInstance>(std::move(dataReal),
"d");
654 OnStageInstanceDeletionData::OnStageInstanceDeletionData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
655 this->
stageInstance = data.processJsonMessage<StageInstance>(std::move(dataReal),
"d");
658 if (Guilds::getCache().contains(guild)) {
659 for (uint64_t x = 0; x < Guilds::getCache()[guild].stageInstances.size(); ++x) {
660 if (Guilds::getCache()[guild].stageInstances[x] == this->
stageInstance.
id) {
661 Guilds::getCache()[guild].stageInstances.erase(Guilds::getCache()[guild].stageInstances.begin() + x);
667 OnTypingStartData::OnTypingStartData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
668 this->
typingStartData = data.processJsonMessage<TypingStartData>(std::move(dataReal),
"d");
671 OnUserUpdateData::OnUserUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
672 this->
user = std::make_unique<UserData>(data.processJsonMessage<UserData>(std::move(dataReal),
"d"));
673 if (Users::doWeCacheUsers()) {
674 Users::insertUser(*
user);
678 OnVoiceStateUpdateData::OnVoiceStateUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal,
679 DiscordCoreInternal::WebSocketClient* sslShard) {
680 this->
voiceStateData = data.processJsonMessage<VoiceStateData>(std::move(dataReal),
"d");
682 if (sslShard->areWeCollectingData && !sslShard->stateUpdateCollected && !sslShard->serverUpdateCollected &&
683 this->voiceStateData.userId == sslShard->userId) {
684 sslShard->voiceConnectionData = DiscordCoreInternal::VoiceConnectionData{};
686 sslShard->stateUpdateCollected =
true;
687 }
else if (sslShard->areWeCollectingData && !sslShard->stateUpdateCollected) {
689 if (sslShard->voiceConnectionDataBuffersMap.contains(this->voiceStateData.guildId.operator
size_t())) {
691 sslShard->voiceConnectionData);
693 sslShard->serverUpdateCollected =
false;
694 sslShard->stateUpdateCollected =
false;
695 sslShard->areWeCollectingData =
false;
700 OnWebhookUpdateData::OnWebhookUpdateData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
701 this->
channelId = getId(dataReal[
"d"].value(),
"channel_id");
702 this->
guildId = getId(dataReal[
"d"].value(),
"guild_id");
705 OnAutoCompleteEntryData::OnAutoCompleteEntryData(DiscordCoreInternal::WebSocketMessage& data, Value dataReal) {
706 this->
inputEvent = data.processJsonMessage<InputEventData>(std::move(dataReal),
"d");
711 return this->onApplicationCommandPermissionsUpdateEvent.add(std::move(handler));
715 return this->onApplicationCommandPermissionsUpdateEvent.remove(token);
720 return this->onAutoModerationRuleCreationEvent.add(std::move(handler));
724 return this->onAutoModerationRuleCreationEvent.remove(token);
729 return this->onAutoModerationRuleUpdateEvent.add(std::move(handler));
733 return this->onAutoModerationRuleUpdateEvent.remove(token);
738 return this->onAutoModerationRuleDeletionEvent.add(std::move(handler));
742 return this->onAutoModerationRuleDeletionEvent.remove(token);
747 return this->onAutoModerationActionExecutionEvent.add(std::move(handler));
751 return this->onAutoModerationActionExecutionEvent.remove(token);
756 return this->onAutoCompleteEntryEvent.add(std::move(handler));
760 return this->onInputEventCreationEvent.remove(token);
765 return this->onInputEventCreationEvent.add(std::move(handler));
769 return this->onInputEventCreationEvent.remove(token);
774 return this->onChannelCreationEvent.add(std::move(handler));
778 onChannelCreationEvent.remove(token);
783 return this->onChannelUpdateEvent.add(std::move(handler));
787 onChannelUpdateEvent.remove(token);
792 return this->onChannelDeletionEvent.add(std::move(handler));
796 onChannelDeletionEvent.remove(token);
801 return this->onChannelPinsUpdateEvent.add(std::move(handler));
805 return this->onChannelPinsUpdateEvent.remove(token);
810 return this->onThreadCreationEvent.add(std::move(handler));
814 return this->onThreadCreationEvent.remove(token);
819 return this->onThreadUpdateEvent.add(std::move(handler));
823 return this->onThreadUpdateEvent.remove(token);
828 return this->onThreadDeletionEvent.add(std::move(handler));
832 return this->onThreadDeletionEvent.remove(token);
837 return this->onThreadListSyncEvent.add(std::move(handler));
841 return this->onThreadListSyncEvent.remove(token);
846 return this->onThreadMemberUpdateEvent.add(std::move(handler));
850 return this->onThreadMemberUpdateEvent.remove(token);
855 return this->onThreadMembersUpdateEvent.add(std::move(handler));
859 return this->onThreadMembersUpdateEvent.remove(token);
864 return this->onGuildCreationEvent.add(std::move(handler));
868 onGuildCreationEvent.remove(token);
873 return this->onGuildUpdateEvent.add(std::move(handler));
877 onGuildUpdateEvent.remove(token);
882 return this->onGuildDeletionEvent.add(std::move(handler));
886 onGuildDeletionEvent.remove(token);
891 return this->onGuildBanAddEvent.add(std::move(handler));
895 onGuildBanAddEvent.remove(token);
900 return this->onGuildBanRemoveEvent.add(std::move(handler));
904 onGuildBanRemoveEvent.remove(token);
909 return this->onGuildEmojisUpdateEvent.add(std::move(handler));
913 onGuildEmojisUpdateEvent.remove(token);
918 return this->onGuildStickersUpdateEvent.add(std::move(handler));
922 onGuildStickersUpdateEvent.remove(token);
927 return this->onGuildIntegrationsUpdateEvent.add(std::move(handler));
931 onGuildIntegrationsUpdateEvent.remove(token);
936 return this->onGuildMembersChunkEvent.add(std::move(handler));
940 onGuildMembersChunkEvent.remove(token);
945 return this->onGuildMemberAddEvent.add(std::move(handler));
949 onGuildMemberAddEvent.remove(token);
954 return this->onGuildMemberRemoveEvent.add(std::move(handler));
958 onGuildMemberRemoveEvent.remove(token);
963 return this->onGuildMemberUpdateEvent.add(std::move(handler));
967 onGuildMemberUpdateEvent.remove(token);
972 return this->onRoleCreationEvent.add(std::move(handler));
976 onRoleCreationEvent.remove(token);
981 return this->onRoleUpdateEvent.add(std::move(handler));
985 onRoleUpdateEvent.remove(token);
990 return this->onRoleDeletionEvent.add(std::move(handler));
994 onRoleDeletionEvent.remove(token);
999 return this->onGuildScheduledEventCreationEvent.add(std::move(handler));
1003 onGuildScheduledEventCreationEvent.remove(token);
1008 return this->onGuildScheduledEventUpdateEvent.add(std::move(handler));
1012 onGuildScheduledEventUpdateEvent.remove(token);
1017 return this->onGuildScheduledEventDeletionEvent.add(std::move(handler));
1021 onGuildScheduledEventDeletionEvent.remove(token);
1026 return this->onGuildScheduledEventUserAddEvent.add(std::move(handler));
1030 onGuildScheduledEventUserAddEvent.remove(token);
1035 return this->onGuildScheduledEventUserRemoveEvent.add(std::move(handler));
1039 onGuildScheduledEventUserRemoveEvent.remove(token);
1044 return this->onIntegrationCreationEvent.add(std::move(handler));
1048 onIntegrationCreationEvent.remove(token);
1053 return this->onIntegrationUpdateEvent.add(std::move(handler));
1057 onIntegrationUpdateEvent.remove(token);
1062 return this->onIntegrationDeletionEvent.add(std::move(handler));
1066 onIntegrationDeletionEvent.remove(token);
1071 return this->onInteractionCreationEvent.add(std::move(handler));
1075 onInteractionCreationEvent.remove(token);
1080 return this->onInviteCreationEvent.add(std::move(handler));
1084 onInviteCreationEvent.remove(token);
1089 return this->onInviteDeletionEvent.add(std::move(handler));
1093 onInviteDeletionEvent.remove(token);
1098 return this->onMessageCreationEvent.add(std::move(handler));
1102 onMessageCreationEvent.remove(token);
1107 return this->onMessageUpdateEvent.add(std::move(handler));
1111 onMessageUpdateEvent.remove(token);
1116 return this->onMessageDeletionEvent.add(std::move(handler));
1120 onMessageDeletionEvent.remove(token);
1125 return this->onMessageDeleteBulkEvent.add(std::move(handler));
1129 onMessageDeleteBulkEvent.remove(token);
1134 return this->onReactionAddEvent.add(std::move(handler));
1138 onReactionAddEvent.remove(token);
1143 return this->onReactionRemoveEvent.add(std::move(handler));
1147 onReactionRemoveEvent.remove(token);
1152 return this->onReactionRemoveAllEvent.add(std::move(handler));
1156 onReactionRemoveAllEvent.remove(token);
1161 return this->onReactionRemoveEmojiEvent.add(std::move(handler));
1165 onReactionRemoveEmojiEvent.remove(token);
1170 return this->onPresenceUpdateEvent.add(std::move(handler));
1174 onPresenceUpdateEvent.remove(token);
1179 return this->onStageInstanceCreationEvent.add(std::move(handler));
1183 onStageInstanceCreationEvent.remove(token);
1188 return this->onStageInstanceUpdateEvent.add(std::move(handler));
1192 onStageInstanceUpdateEvent.remove(token);
1197 return this->onStageInstanceDeletionEvent.add(std::move(handler));
1201 onStageInstanceDeletionEvent.remove(token);
1206 return this->onTypingStartEvent.add(std::move(handler));
1210 onTypingStartEvent.remove(token);
1215 return this->onUserUpdateEvent.add(std::move(handler));
1219 onUserUpdateEvent.remove(token);
1224 return this->onVoiceStateUpdateEvent.add(std::move(handler));
1228 onVoiceStateUpdateEvent.remove(token);
1233 return this->onVoiceServerUpdateEvent.add(std::move(handler));
1237 onVoiceServerUpdateEvent.remove(token);
1242 return this->onWebhookUpdateEvent.add(std::move(handler));
1246 onWebhookUpdateEvent.remove(token);
@ Role_Select
Select menu for roles.
@ Mentionable_Select
Select menu for mentionables (users and roles).
@ Channel_Select
Select menu for channels.
@ String_Select
Select menu for picking from defined text options.
@ User_Select
Select menu for users.
@ Message_Component
Message component.
@ Application_Command_Autocomplete
Application command autocomplete.
@ Application_Command
Application command.
@ Modal_Submit
Modal submission.
The main namespace for this library.
A CoRoutine - representing a potentially asynchronous operation/function.
Event-delegate token, representing an event.
Event-delegate, for representing an event-function to be executed.
Data that is received as part of an InputEvent creation event.
InputEventData inputEventData
InputEventData representing the input-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.
std::unique_ptr< ChannelData > channel
The new Channel.
Data that is received as part of a Channel update event.
std::unique_ptr< ChannelData > channel
The new Channel.
Data that is received as part of a Channel deletion event.
std::unique_ptr< ChannelData > channel
The deleted Channel.
Data that is received as part of a Channel pins update event.
ChannelPinsUpdateEventData dataPackage
The Channel pins update responseData.
Data that is received as part of a Thread creation event.
Thread thread
The new Thread's Channel.
Data that is received as part of a Thread update event.
Thread thread
The new Thread's Channel.
Data that is received as part of a Thread deletion event.
Thread thread
The deleted Thread's Channel.
Data that is received as part of a Thread list sync event.
ThreadListSyncData threadListSyncData
The Thread list sync responseData.
Data that is received as part of a Thread member update event.
ThreadMemberData threadMember
Thread member update responseData.
Data that is received as part of a Thread members update event.
ThreadMembersUpdateData threadMembersUpdateData
Thread member's update responseData.
Data that is received as part of a Guild creation event.
std::unique_ptr< GuildData > guild
The new Guild.
Data that is received as part of a Guild update event.
std::unique_ptr< GuildData > guild
The new Guild.
Data that is received as part of a Guild deletion event.
std::unique_ptr< GuildData > guild
The deleted Guild.
Data that is received as part of a Guild ban add event.
Snowflake guildId
The Guild they were banned from.
User user
The User id of the person who was banned.
Data that is received as part of a Guild ban add event.
Snowflake guildId
The Guild they were un-banned from.
User user
The User id of the person who was un-banned.
Data that is received as part of a Guild emojis update event.
GuildEmojisUpdateEventData updateData
The Guild emoji's update responseData.
Data that is received as part of a Guild sticker update event.
GuildStickersUpdateEventData updateData
The GuildStickersUpdateEventData.
Data that is received as part of a Guild Integration update event.
Snowflake guildId
The id of the Guild for which the integrations were updated.
Data that is received as part of a GuildMember add event.
std::unique_ptr< GuildMemberData > guildMember
The new GuildMember.
Data that is received as part of a GuildMember update event.
Data that is received as part of a GuildMember remove event.
std::unique_ptr< UserData > user
The User responseData of the removed GuildMember.
Snowflake guildId
The id of the Guild from which they were removed.
Data that is received as part of a GuildMembers chunk event.
GuildMembersChunkEventData chunkEventData
GuildMembersChunkEventData structure.
Data that is received as part of a Role creation event.
Snowflake guildId
The id of the Guild within which the Role was created.
std::unique_ptr< RoleData > role
The new Role.
Data that is received as part of a Role update event.
std::unique_ptr< RoleData > role
The new Role.
Snowflake guildId
The id of the Guild within which the Role was updated.
Data that is received as part of a Role deletion event.
std::unique_ptr< RoleData > role
The deleted Role.
Snowflake guildId
The id of the Guild from which the Role was deleted.
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.
Snowflake guildId
The id of the Guild for which this Integration was created.
IntegrationData integrationData
The new IntegrationData structure.
Data that is received as part of an Integration update event.
IntegrationData integrationData
New IntegrationData structure.
Snowflake guildId
The id of the Guild for which the Integration was updated.
Data that is received as part of an Integration deletion event.
Snowflake applicationId
Application id of the current application.
Snowflake guildId
The id of the Guild for which the Integration was deleted.
Data that is received as part of an Invite creation event.
InviteData invite
Thew new InviteData structure.
Data that is received as part of an Invite deletion event.
Snowflake guildId
The id of the Guild for which the Invite existed.
std::string code
The code of the Invite.
Snowflake channelId
The id of the Channel for which the Invite existed.
Data that is received as part of an Interaction creation event.
InteractionData interactionData
The InteractionData representing the Interaction.
Data that is received as part of a Message creation event.
Message message
The new Message.
Data that is received as part of a Message update event.
Message messageNew
The new Message.
Data that is received as part of a Message deletion event.
Snowflake guildId
The id of the Guild from which the Message was deleted.
Snowflake messageId
The id of the Message which was deleted.
Snowflake channelId
The id of the Channel from which the Message was deleted.
Data that is received as part of a Message delete bulk event.
std::vector< Snowflake > ids
A vector containing the list of deleted Message ids.
Snowflake channelId
The id of the Channel from which the Message was deleted.
Snowflake guildId
The id of the Guild from which the Message was deleted.
Data that is received as part of a Reaction add event.
Reaction reaction
The Reaction that was added.
Data that is received as part of a Reaction remove event.
ReactionRemoveData reactionRemoveData
The ReactionRemoveData.
Data that is received as part of a Reaction remove all event.
Snowflake messageId
The id of the Message from which the Reactions were deleted.
Snowflake channelId
The id of the Channel from which the Reactions were deleted.
Snowflake guildId
The id of the Guild from which the Reactions were deleted.
Data that is received as part of a Reaction remove emoji event.
Snowflake guildId
The id of the Guild from which the Reactions were deleted.
Snowflake messageId
The id of the Message from which the Reactions were deleted.
EmojiData emoji
The id of the Emoji which was removed from the Message.
Snowflake channelId
The id of the Channel from which the Reactions were deleted.
Data that is received as part of a presence update event.
PresenceUpdateData presenceData
PresenceUpdateData..
Data that is received as part of a StageInstance creation event.
StageInstanceData stageInstance
The new StageInstanceData.
Data that is received as part of a StageInstance update event.
StageInstanceData stageInstance
The new StageInstanceData.
Data that is received as part of a StageInstance deletion event.
StageInstanceData stageInstance
The deleted StageInstanceData.
Data that is received as part of a typing start event.
TypingStartData typingStartData
TypingStartData of the event.
Data that is received as part of a User update event.
std::unique_ptr< UserData > user
The new User.
Data that is received as part of a voice state update event.
VoiceStateData voiceStateData
VoiceStateData for the new voice state.
Data that is received as part of a voice server update event.
Snowflake guildId
The id of the Guild for which the server update is occurring.
std::string token
The token of the server update event.
std::string endpoint
The new endpoint.
Data that is received as part of a WebHook update event.
Snowflake guildId
Id of the Guild for which the WebHook Update is occurring.
Snowflake channelId
Id of the Channel for which the WebHook Update is occurring.
Data that is received upon the bot receiving an autocomplete entry.
InputEventData inputEvent
The input-event representing the autocomplete entry.
DiscordCoreInternal::EventDelegateToken onStageInstanceUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnStageInstanceUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onChannelUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnChannelUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onAutoModerationActionExecution(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnAutoModerationActionExecutionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onApplicationCommandsPermissionsUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnApplicationCommandPermissionsUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildBanRemove(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildBanRemoveData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onChannelDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnChannelDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onVoiceServerUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnVoiceServerUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onMessageDeleteBulk(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnMessageDeleteBulkData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onMessageUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnMessageUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onInputEventCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnInputEventCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onWebhookUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnWebhookUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildEmojisUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildEmojisUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildMemberAdd(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildMemberAddData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onReactionAdd(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnReactionAddData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildScheduledEventDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildScheduledEventDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildMemberUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildMemberUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onInviteCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnInviteCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onUserUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnUserUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onStageInstanceDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnStageInstanceDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onAutoModerationRuleUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnAutoModerationRuleUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onInviteDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnInviteDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadMembersUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadMembersUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onStageInstanceCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnStageInstanceCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildScheduledEventUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onReactionRemoveEmoji(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnReactionRemoveEmojiData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onAutoModerationRuleCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnAutoModerationRuleCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onReactionRemove(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnReactionRemoveData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUserRemove(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildScheduledEventUserRemoveData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onChannelPinsUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnChannelPinsUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onAutoCompleteEntry(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnAutoCompleteEntryData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildIntegrationsUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildIntegrationsUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onMessageCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnMessageCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildMemberRemove(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildMemberRemoveData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onRoleDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnRoleDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onPresenceUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnPresenceUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onReactionRemoveAll(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnReactionRemoveAllData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onChannelCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnChannelCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onRoleUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnRoleUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadMemberUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadMemberUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildScheduledEventCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildScheduledEventCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildBanAdd(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildBanAddData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildMembersChunk(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildMembersChunkData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onInteractionCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnInteractionCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onTypingStart(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnTypingStartData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onVoiceStateUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnVoiceStateUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onRoleCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnRoleCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onIntegrationDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnIntegrationDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildScheduledEventUserAdd(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildScheduledEventUserAddData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onThreadListSync(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnThreadListSyncData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onAutoModerationRuleDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnAutoModerationRuleDeletionData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onIntegrationCreation(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnIntegrationCreationData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onGuildStickersUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnGuildStickersUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onIntegrationUpdate(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnIntegrationUpdateData > handler)
For adding a function to handle this event.
DiscordCoreInternal::EventDelegateToken onMessageDeletion(const DiscordCoreInternal::EventDelegate< CoRoutine< void >, OnMessageDeletionData > handler)
For adding a function to handle this event.
Snowflake guildId
The Guild id this voice state is for.
std::string sessionId
The session id for this voice state.
Snowflake guildId
Id of the Channel's Guild, if applicable.
Snowflake guildId
The Guild id for which the Channel exists in.
Snowflake guildId
The Guild id which the scheduled event belongs to.
ComponentType componentType
The type of component.
ComponentInteractionData componentData
Component Interaction data.
InteractionDataData data
The Interaction's data.
InteractionType type
The type of Interaction.
static GuildMemberData getCachedGuildMember(GetGuildMemberData dataPackage)
Collects a GuildMember from the library's cache.
static RoleData getCachedRole(GetRoleData dataPackage)
Collects a given Role from the library's cache.