38 template<>
struct core<discord_core_api::auto_moderation_action_execution_event_data> {
39 using value_type = discord_core_api::auto_moderation_action_execution_event_data;
40 static constexpr auto parseValue = createValue(
"alert_system_message_id", &value_type::alertSystemMessageId,
"rule_trigger_type", &value_type::ruleTriggerType,
41 "matched_keyword", &value_type::matchedKeyword,
"matched_content", &value_type::matchedContent,
"content", &value_type::content,
"channel_id", &value_type::channelId,
42 "message_id", &value_type::messageId,
"action", &value_type::action,
"guild_id", &value_type::guildId,
"rule_id", &value_type::ruleId,
"user_id", &value_type::userId);
45 template<>
struct core<discord_core_api::voice_state_data> {
46 using value_type2 = discord_core_api::voice_state_data;
47 static constexpr auto parseValue =
48 createValue(
"request_to_speak_timestamp", &value_type2::requestToSpeakTimestamp,
"session_id", &value_type2::sessionId,
"self_stream", &value_type2::selfStream,
49 "self_video", &value_type2::selfVideo,
"self_deaf", &value_type2::selfDeaf,
"self_mute", &value_type2::selfMute,
"suppress", &value_type2::suppress,
"deaf",
50 &value_type2::deaf,
"mute", &value_type2::mute,
"user_id", &value_type2::userId,
"channel_id", &value_type2::channelId,
"guild_id", &value_type2::guildId);
53 template<>
struct core<discord_core_api::guild_emojis_update_event_data> {
54 using value_type = discord_core_api::guild_emojis_update_event_data;
55 static constexpr auto parseValue = createValue(
"emojis", &value_type::emojis,
"guild_id", &value_type::guildId);
58 template<>
struct core<discord_core_api::channel_pins_update_event_data> {
59 using value_type = discord_core_api::channel_pins_update_event_data;
60 static constexpr auto parseValue =
61 createValue(
"last_pin_timestamp", &value_type::lastPinTimeStamp,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId);
64 template<>
struct core<discord_core_api::typing_start_data> {
65 using value_type = discord_core_api::typing_start_data;
66 static constexpr auto parseValue = createValue(
"member", &value_type::member,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"timestamp",
67 &value_type::timeStamp,
"user_id", &value_type::userId);
70 template<>
struct core<discord_core_api::reaction_remove_data> {
71 using value_type = discord_core_api::reaction_remove_data;
72 static constexpr auto parseValue = createValue(
"channel_id", &value_type::channelId,
"message_id", &value_type::messageId,
"guild_id", &value_type::guildId,
"user_id",
73 &value_type::userId,
"emoji", &value_type::emoji);
76 template<>
struct core<discord_core_api::guild_stickers_update_event_data> {
77 using value_type = discord_core_api::guild_stickers_update_event_data;
78 static constexpr auto parseValue = createValue(
"stickers", &value_type::stickers,
"guild_id", &value_type::guildId);
81 template<>
struct core<discord_core_api::voice_server_update_data> {
82 using value_type = discord_core_api::voice_server_update_data;
83 static constexpr auto parseValue = createValue(
"endpoint", &value_type::endpoint,
"guild_id", &value_type::guildId,
"token", &value_type::token);
86 template<>
struct core<discord_core_api::guild_members_chunk_event_data> {
87 using value_type = discord_core_api::guild_members_chunk_event_data;
88 static constexpr auto parseValue = createValue(
"presences", &value_type::presences,
"members", &value_type::members,
"not_found", &value_type::notFound,
"chunk_index",
89 &value_type::chunkIndex,
"chunk_count", &value_type::chunkCount,
"guild_id", &value_type::guildId,
"nonce", &value_type::nonce);
92 template<>
struct core<discord_core_api::guild_member_remove_data> {
93 using value_type = discord_core_api::guild_member_remove_data;
94 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"user", &value_type::user);
97 template<>
struct core<discord_core_api::guild_ban_add_data> {
98 using value_type = discord_core_api::guild_ban_add_data;
99 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"user", &value_type::user);
102 template<>
struct core<discord_core_api::guild_ban_remove_data> {
103 using value_type = discord_core_api::guild_ban_remove_data;
104 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"user", &value_type::user);
107 template<>
struct core<discord_core_api::role_creation_data> {
108 using value_type = discord_core_api::role_creation_data;
109 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"role", &value_type::role);
112 template<>
struct core<discord_core_api::role_update_data> {
113 using value_type = discord_core_api::role_update_data;
114 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"role", &value_type::role);
117 template<>
struct core<discord_core_api::role_deletion_data> {
118 using value_type = discord_core_api::role_deletion_data;
119 static constexpr auto parseValue = createValue(
"guild_id", &value_type::guildId,
"role", &value_type::role);
122 template<>
struct core<discord_core_api::guild_scheduled_event_user_add_data> {
123 using value_type = discord_core_api::guild_scheduled_event_user_add_data;
124 static constexpr auto parseValue =
125 createValue(
"guild_scheduled_event_id", &value_type::guildScheduledEventId,
"guild_id", &value_type::guildId,
"user_id", &value_type::userId);
128 template<>
struct core<discord_core_api::guild_scheduled_event_user_remove_data> {
129 using value_type = discord_core_api::guild_scheduled_event_user_remove_data;
130 static constexpr auto parseValue =
131 createValue(
"guild_scheduled_event_id", &value_type::guildScheduledEventId,
"guild_id", &value_type::guildId,
"user_id", &value_type::userId);
134 template<>
struct core<discord_core_api::integration_creation_data> {
135 using value_type = discord_core_api::integration_creation_data;
136 static constexpr auto parseValue = createValue(
"integration_data", &value_type::integrationData,
"guild_id", &value_type::guildId);
139 template<>
struct core<discord_core_api::integration_update_data> {
140 using value_type = discord_core_api::integration_update_data;
141 static constexpr auto parseValue = createValue(
"integration_data", &value_type::integrationData,
"guild_id", &value_type::guildId);
144 template<>
struct core<discord_core_api::integration_deletion_data> {
145 using value_type = discord_core_api::integration_deletion_data;
146 static constexpr auto parseValue = createValue(
"application_id", &value_type::applicationId,
"guild_id", &value_type::guildId,
"id", &value_type::id);
149 template<>
struct core<discord_core_api::invite_deletion_data> {
150 using value_type = discord_core_api::invite_deletion_data;
151 static constexpr auto parseValue = createValue(
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"code", &value_type::code);
154 template<>
struct core<discord_core_api::message_deletion_data> {
155 using value_type = discord_core_api::message_deletion_data;
156 static constexpr auto parseValue = createValue(
"message_id", &value_type::messageId,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId);
159 template<>
struct core<discord_core_api::message_deletion_bulk_data> {
160 using value_type = discord_core_api::message_deletion_bulk_data;
161 static constexpr auto parseValue = createValue(
"ids", &value_type::ids,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId);
164 template<>
struct core<discord_core_api::reaction_remove_all_data> {
165 using value_type = discord_core_api::reaction_remove_all_data;
166 static constexpr auto parseValue = createValue(
"channel_id", &value_type::channelId,
"message_id", &value_type::messageId,
"guild_id", &value_type::guildId);
169 template<>
struct core<discord_core_api::reaction_remove_emoji_data> {
170 using value_type = discord_core_api::reaction_remove_emoji_data;
171 static constexpr auto parseValue =
172 createValue(
"message_id", &value_type::messageId,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"emoji", &value_type::emoji);
175 template<>
struct core<discord_core_api::web_hook_update_data> {
176 using value_type = discord_core_api::web_hook_update_data;
177 static constexpr auto parseValue = createValue(
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId);
184 template<> unordered_map<jsonifier::string, unbounded_message_block<message_data>*> object_collector<message_data>::objectsBuffersMap;
186 template<> unordered_map<jsonifier::string, unbounded_message_block<reaction_data>*> object_collector<reaction_data>::objectsBuffersMap;
188 on_input_event_creation_data::on_input_event_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
189 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
190 if (
auto result = parserNew.getErrors(); result.size() > 0) {
191 for (
auto& valueNew: result) {
197 on_application_command_permissions_update_data::on_application_command_permissions_update_data(jsonifier::jsonifier_core<false>& parserNew,
198 jsonifier::string_view_base<uint8_t> dataToParse) {
199 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
200 if (
auto result = parserNew.getErrors(); result.size() > 0) {
201 for (
auto& valueNew: result) {
207 on_auto_moderation_rule_creation_data::on_auto_moderation_rule_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
208 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
209 if (
auto result = parserNew.getErrors(); result.size() > 0) {
210 for (
auto& valueNew: result) {
216 on_auto_moderation_rule_update_data::on_auto_moderation_rule_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
217 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
218 if (
auto result = parserNew.getErrors(); result.size() > 0) {
219 for (
auto& valueNew: result) {
225 on_auto_moderation_rule_deletion_data::on_auto_moderation_rule_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
226 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
227 if (
auto result = parserNew.getErrors(); result.size() > 0) {
228 for (
auto& valueNew: result) {
234 on_auto_moderation_action_execution_data::on_auto_moderation_action_execution_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
235 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
236 if (
auto result = parserNew.getErrors(); result.size() > 0) {
237 for (
auto& valueNew: result) {
243 on_channel_creation_data::on_channel_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
244 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
245 if (
auto result = parserNew.getErrors(); result.size() > 0) {
246 for (
auto& valueNew: result) {
250 if (channels::doWeCacheChannels()) {
251 channels::insertChannel(
static_cast<channel_cache_data
>(value));
253 if (guilds::doWeCacheGuilds()) {
254 if (guilds::getCache().contains(value.guildId)) {
255 guilds::getCache()[value.guildId].channels.emplace_back(value.id);
260 on_channel_update_data::on_channel_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
261 parserNew.parseJson(*
static_cast<updated_event_data*
>(
this), dataToParse);
262 if (channels::doWeCacheChannels()) {
264 channels::insertChannel(
static_cast<channel_cache_data
>(value));
268 on_channel_deletion_data::on_channel_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
269 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
270 if (
auto result = parserNew.getErrors(); result.size() > 0) {
271 for (
auto& valueNew: result) {
275 if (channels::doWeCacheChannels()) {
276 channels::removeChannel(
static_cast<channel_cache_data
>(value));
278 if (guilds::doWeCacheGuilds()) {
279 if (guilds::getCache().contains(value.guildId)) {
280 for (uint64_t x = 0; x < guilds::getCache().operator[](value.guildId).channels.size(); ++x) {
281 if (guilds::getCache().
operator[](value.guildId).channels.at(x) ==
static_cast<uint64_t
>(value.id)) {
282 guilds::getCache().operator[](value.guildId).channels.erase(guilds::getCache().operator[](value.guildId).channels.begin() +
static_cast<int64_t
>(x));
289 on_channel_pins_update_data::on_channel_pins_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
290 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
291 if (
auto result = parserNew.getErrors(); result.size() > 0) {
292 for (
auto& valueNew: result) {
298 on_thread_creation_data::on_thread_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
299 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
300 if (
auto result = parserNew.getErrors(); result.size() > 0) {
301 for (
auto& valueNew: result) {
307 on_thread_update_data::on_thread_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
308 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
309 if (
auto result = parserNew.getErrors(); result.size() > 0) {
310 for (
auto& valueNew: result) {
316 on_thread_deletion_data::on_thread_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
317 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
318 if (
auto result = parserNew.getErrors(); result.size() > 0) {
319 for (
auto& valueNew: result) {
325 on_thread_list_sync_data::on_thread_list_sync_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
326 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
327 if (
auto result = parserNew.getErrors(); result.size() > 0) {
328 for (
auto& valueNew: result) {
334 on_thread_member_update_data::on_thread_member_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
335 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
336 if (
auto result = parserNew.getErrors(); result.size() > 0) {
337 for (
auto& valueNew: result) {
343 on_thread_members_update_data::on_thread_members_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
344 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
345 if (
auto result = parserNew.getErrors(); result.size() > 0) {
346 for (
auto& valueNew: result) {
352 on_guild_creation_data::on_guild_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
353 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
354 if (
auto result = parserNew.getErrors(); result.size() > 0) {
355 for (
auto& valueNew: result) {
359 if (guild_members::doWeCacheGuildMembers()) {
360 for (
auto& valueNew: value.members) {
362 valueNew.guildId = value.id;
363 guild_members::insertGuildMember(
static_cast<guild_member_cache_data
>(valueNew));
369 if (users::doWeCacheUsers()) {
370 for (
auto& valueNew: value.members) {
372 if (users::doWeCacheUsers()) {
373 users::insertUser(
static_cast<user_cache_data
>(valueNew.user));
380 if (guild_members::doWeCacheVoiceStates()) {
381 for (
auto& valueNew: value.voiceStates) {
383 valueNew.guildId = value.id;
384 guild_members::insertVoiceState(
static_cast<voice_state_data_light
>(valueNew));
385 guild_member_data newMember{};
386 newMember.guildId = value.id;
387 newMember.user.id = valueNew.userId;
388 two_id_key newKey{ newMember };
394 if (channels::doWeCacheChannels()) {
395 for (
auto& valueNew: value.channels) {
397 valueNew.guildId = value.id;
398 channels::insertChannel(
static_cast<channel_cache_data
>(valueNew));
404 if (roles::doWeCacheRoles()) {
405 for (
auto& valueNew: value.roles) {
407 roles::insertRole(
static_cast<role_cache_data
>(valueNew));
413 if (guilds::doWeCacheGuilds()) {
414 guilds::insertGuild(
static_cast<guild_cache_data
>(value));
418 on_guild_update_data::on_guild_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
419 parserNew.parseJson(*
static_cast<updated_event_data*
>(
this), dataToParse);
420 if (guilds::doWeCacheGuilds()) {
422 guilds::insertGuild(
static_cast<guild_cache_data
>(value));
426 on_guild_deletion_data::on_guild_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
427 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
428 if (
auto result = parserNew.getErrors(); result.size() > 0) {
429 for (
auto& valueNew: result) {
433 for (
auto& valueNew: value.members) {
434 guild_members::removeGuildMember(valueNew);
436 for (
auto& valueNew: value.channels) {
437 channels::removeChannel(valueNew);
439 for (
auto& valueNew: value.roles) {
440 roles::removeRole(valueNew);
442 if (guilds::doWeCacheGuilds()) {
443 guilds::removeGuild(value);
447 on_guild_ban_add_data::on_guild_ban_add_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
448 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
449 if (
auto result = parserNew.getErrors(); result.size() > 0) {
450 for (
auto& valueNew: result) {
454 if (guilds::getCache().contains(value.guildId)) {
455 for (uint64_t x = 0; x < guilds::getCache().operator[](value.guildId).members.size(); ++x) {
456 if (guilds::getCache().
operator[](value.guildId).members.at(x) ==
static_cast<uint64_t
>(value.user.id)) {
457 guilds::getCache().operator[](value.guildId).members.erase(guilds::getCache().operator[](value.guildId).members.begin() +
static_cast<int64_t
>(x));
458 --guilds::getCache()[value.guildId].memberCount;
464 on_guild_ban_remove_data::on_guild_ban_remove_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
465 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
466 if (
auto result = parserNew.getErrors(); result.size() > 0) {
467 for (
auto& valueNew: result) {
473 on_guild_emojis_update_data::on_guild_emojis_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
474 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
475 if (
auto result = parserNew.getErrors(); result.size() > 0) {
476 for (
auto& valueNew: result) {
480 if (guilds::getCache().contains(value.guildId)) {
481 guilds::getCache()[value.guildId].emoji.clear();
482 for (
auto& valueNew: value.emojis) {
483 guilds::getCache()[value.guildId].emoji.emplace_back(valueNew.id);
488 on_guild_stickers_update_data::on_guild_stickers_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
489 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
490 if (
auto result = parserNew.getErrors(); result.size() > 0) {
491 for (
auto& valueNew: result) {
497 on_guild_integrations_update_data::on_guild_integrations_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
498 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
499 if (
auto result = parserNew.getErrors(); result.size() > 0) {
500 for (
auto& valueNew: result) {
506 on_guild_member_add_data::on_guild_member_add_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
507 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
508 if (
auto result = parserNew.getErrors(); result.size() > 0) {
509 for (
auto& valueNew: result) {
513 if (guild_members::doWeCacheGuildMembers()) {
514 guild_members::insertGuildMember(
static_cast<guild_member_cache_data
>(value));
516 if (guilds::doWeCacheGuilds()) {
517 if (guilds::getCache().contains(value.guildId)) {
518 ++guilds::getCache()[value.guildId].memberCount;
519 guilds::getCache()[value.guildId].members.emplace_back(value.user.id);
524 on_guild_member_remove_data::on_guild_member_remove_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
525 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
526 if (
auto result = parserNew.getErrors(); result.size() > 0) {
527 for (
auto& valueNew: result) {
531 if (guild_members::doWeCacheGuildMembers()) {
533 guild_members::removeGuildMember(guildMember);
535 if (guilds::doWeCacheGuilds()) {
536 if (guilds::getCache().contains(value.guildId)) {
537 for (uint64_t x = 0; x < guilds::getCache().operator[](value.guildId).members.size(); ++x) {
538 if (guilds::getCache().
operator[](value.guildId).members.at(x) ==
static_cast<uint64_t
>(value.user.id)) {
539 guilds::getCache().operator[](value.guildId).members.erase(guilds::getCache().operator[](value.guildId).members.begin() +
static_cast<int64_t
>(x));
540 --guilds::getCache()[value.guildId].memberCount;
547 on_guild_member_update_data::on_guild_member_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
548 parserNew.parseJson(*
static_cast<updated_event_data*
>(
this), dataToParse);
549 if (guild_members::doWeCacheGuildMembers()) {
551 guild_members::insertGuildMember(
static_cast<guild_member_cache_data
>(value));
555 on_guild_members_chunk_data::on_guild_members_chunk_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
556 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
557 if (
auto result = parserNew.getErrors(); result.size() > 0) {
558 for (
auto& valueNew: result) {
564 on_role_creation_data::on_role_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
565 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
566 if (
auto result = parserNew.getErrors(); result.size() > 0) {
567 for (
auto& valueNew: result) {
571 if (roles::doWeCacheRoles()) {
572 roles::insertRole(
static_cast<role_cache_data
>(value.role));
574 if (guilds::doWeCacheGuilds()) {
575 if (guilds::getCache().contains(value.guildId)) {
576 guilds::getCache()[value.guildId].roles.emplace_back(value.role.id);
581 on_role_update_data::on_role_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
582 parserNew.parseJson(*
static_cast<updated_event_data*
>(
this), dataToParse);
583 if (roles::doWeCacheRoles()) {
585 roles::insertRole(
static_cast<role_cache_data
>(value.role));
589 on_role_deletion_data::on_role_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
590 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
591 if (
auto result = parserNew.getErrors(); result.size() > 0) {
592 for (
auto& valueNew: result) {
596 if (roles::doWeCacheRoles()) {
597 roles::removeRole(
static_cast<role_cache_data
>(value.role));
599 if (guilds::doWeCacheGuilds()) {
600 if (guilds::getCache().contains(value.guildId)) {
601 for (uint64_t x = 0; x < guilds::getCache().operator[](value.guildId).roles.size(); ++x) {
602 if (guilds::getCache().
operator[](value.guildId).roles.at(x) ==
static_cast<uint64_t
>(value.role.id)) {
603 guilds::getCache().operator[](value.guildId).roles.erase(guilds::getCache().operator[](value.guildId).roles.begin() +
static_cast<int64_t
>(x));
610 on_voice_server_update_data::on_voice_server_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse,
612 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
613 if (
auto result = parserNew.getErrors(); result.size() > 0) {
614 for (
auto& valueNew: result) {
618 if (sslShard->areWeCollectingData.load(std::memory_order_acquire) && !sslShard->serverUpdateCollected && !sslShard->stateUpdateCollected) {
619 sslShard->voiceConnectionData = discord_core_internal::voice_connection_data{};
620 sslShard->voiceConnectionData.endPoint = value.endpoint;
621 sslShard->voiceConnectionData.token = value.token;
622 sslShard->serverUpdateCollected =
true;
623 }
else if (sslShard->areWeCollectingData.load(std::memory_order_acquire) && !sslShard->serverUpdateCollected) {
624 sslShard->voiceConnectionData.endPoint = value.endpoint;
625 sslShard->voiceConnectionData.token = value.token;
626 if (sslShard->voiceConnectionDataBufferMap.contains(value.guildId.operator
const uint64_t&())) {
627 sslShard->voiceConnectionDataBufferMap[value.guildId.operator
const uint64_t&()]->send(sslShard->voiceConnectionData);
629 sslShard->areWeCollectingData.store(
false, std::memory_order_release);
630 sslShard->serverUpdateCollected =
false;
631 sslShard->stateUpdateCollected =
false;
635 on_guild_scheduled_event_creation_data::on_guild_scheduled_event_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
636 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
637 if (
auto result = parserNew.getErrors(); result.size() > 0) {
638 for (
auto& valueNew: result) {
644 on_guild_scheduled_event_update_data::on_guild_scheduled_event_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
645 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
646 if (
auto result = parserNew.getErrors(); result.size() > 0) {
647 for (
auto& valueNew: result) {
653 on_guild_scheduled_event_deletion_data::on_guild_scheduled_event_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
654 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
655 if (
auto result = parserNew.getErrors(); result.size() > 0) {
656 for (
auto& valueNew: result) {
662 on_guild_scheduled_event_user_add_data::on_guild_scheduled_event_user_add_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
663 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
664 if (
auto result = parserNew.getErrors(); result.size() > 0) {
665 for (
auto& valueNew: result) {
671 on_guild_scheduled_event_user_remove_data::on_guild_scheduled_event_user_remove_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
672 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
673 if (
auto result = parserNew.getErrors(); result.size() > 0) {
674 for (
auto& valueNew: result) {
680 on_integration_creation_data::on_integration_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
681 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
682 if (
auto result = parserNew.getErrors(); result.size() > 0) {
683 for (
auto& valueNew: result) {
689 on_integration_update_data::on_integration_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
690 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
691 if (
auto result = parserNew.getErrors(); result.size() > 0) {
692 for (
auto& valueNew: result) {
698 on_integration_deletion_data::on_integration_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
699 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
700 if (
auto result = parserNew.getErrors(); result.size() > 0) {
701 for (
auto& valueNew: result) {
707 on_interaction_creation_data::on_interaction_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
708 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
709 if (
auto result = parserNew.getErrors(); result.size() > 0) {
710 for (
auto& valueNew: result) {
715 switch (value.type) {
719 discord_core_client::getInstance()->getCommandController().checkForAndRunCommand(command_data{ *eventData });
721 eventCreationData->value = *eventData;
725 switch (value.data.componentType) {
731 if (button_collector::buttonInteractionBuffersMap.contains(
732 eventData->getChannelData().id.operator jsonifier::string() + eventData->getMessageData().id.operator jsonifier::string())) {
733 button_collector::buttonInteractionBuffersMap[eventData->getChannelData().id.operator jsonifier::string() +
734 eventData->getMessageData().id.operator jsonifier::string()]
737 button_collector::buttonInteractionEventsMap.operator()(*eventData->interactionData);
751 if (select_menu_collector::selectMenuInteractionBuffersMap.contains(
752 eventData->getChannelData().id.operator jsonifier::string() + eventData->getMessageData().id.operator jsonifier::string())) {
753 select_menu_collector::selectMenuInteractionBuffersMap[eventData->getChannelData().id.operator jsonifier::string() +
754 eventData->getMessageData().id.operator jsonifier::string()]
757 select_menu_collector::selectMenuInteractionEventsMap.operator()(*eventData->interactionData);
770 eventCreationData->value = *eventData;
771 if (modal_collector::modalInteractionBuffersMap.contains(eventData->getChannelData().id.operator jsonifier::string())) {
772 modal_collector::modalInteractionBuffersMap[eventData->getChannelData().id.operator jsonifier::string()]->send(eventData->getInteractionData());
773 modal_collector::modalInteractionEventsMap.operator()(*eventData->interactionData);
781 autocompleteEntryData->value = *eventData;
782 discord_core_client::getInstance()->getEventManager().onAutoCompleteEntryEvent(*autocompleteEntryData);
791 on_invite_creation_data::on_invite_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
792 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
793 if (
auto result = parserNew.getErrors(); result.size() > 0) {
794 for (
auto& valueNew: result) {
800 on_invite_deletion_data::on_invite_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
801 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
802 if (
auto result = parserNew.getErrors(); result.size() > 0) {
803 for (
auto& valueNew: result) {
809 on_message_creation_data::on_message_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
810 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
811 if (
auto result = parserNew.getErrors(); result.size() > 0) {
812 for (
auto& valueNew: result) {
816 for (
auto& [key, valueNew]: message_collector::objectsBuffersMap) {
817 valueNew->send(value);
821 on_message_update_data::on_message_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
822 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
823 if (
auto result = parserNew.getErrors(); result.size() > 0) {
824 for (
auto& valueNew: result) {
828 for (
auto& [key, valueNew]: message_collector::objectsBuffersMap) {
829 valueNew->send(value);
833 on_message_deletion_data::on_message_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
834 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
835 if (
auto result = parserNew.getErrors(); result.size() > 0) {
836 for (
auto& valueNew: result) {
842 on_message_delete_bulk_data::on_message_delete_bulk_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
843 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
844 if (
auto result = parserNew.getErrors(); result.size() > 0) {
845 for (
auto& valueNew: result) {
851 on_reaction_add_data::on_reaction_add_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
852 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
853 if (
auto result = parserNew.getErrors(); result.size() > 0) {
854 for (
auto& valueNew: result) {
858 for (
auto& [key, valueNew]: reaction_collector::objectsBuffersMap) {
859 valueNew->send(value);
863 on_reaction_remove_data::on_reaction_remove_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
864 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
865 if (
auto result = parserNew.getErrors(); result.size() > 0) {
866 for (
auto& valueNew: result) {
872 on_reaction_remove_all_data::on_reaction_remove_all_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
873 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
874 if (
auto result = parserNew.getErrors(); result.size() > 0) {
875 for (
auto& valueNew: result) {
881 on_reaction_remove_emoji_data::on_reaction_remove_emoji_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
882 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
883 if (
auto result = parserNew.getErrors(); result.size() > 0) {
884 for (
auto& valueNew: result) {
890 on_presence_update_data::on_presence_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
891 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
892 if (
auto result = parserNew.getErrors(); result.size() > 0) {
893 for (
auto& valueNew: result) {
899 on_stage_instance_creation_data::on_stage_instance_creation_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
900 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
901 if (
auto result = parserNew.getErrors(); result.size() > 0) {
902 for (
auto& valueNew: result) {
908 on_stage_instance_update_data::on_stage_instance_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
909 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
910 if (
auto result = parserNew.getErrors(); result.size() > 0) {
911 for (
auto& valueNew: result) {
917 on_stage_instance_deletion_data::on_stage_instance_deletion_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
918 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
919 if (
auto result = parserNew.getErrors(); result.size() > 0) {
920 for (
auto& valueNew: result) {
926 on_typing_start_data::on_typing_start_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
927 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
928 if (
auto result = parserNew.getErrors(); result.size() > 0) {
929 for (
auto& valueNew: result) {
935 on_user_update_data::on_user_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
936 parserNew.parseJson(*
static_cast<updated_event_data*
>(
this), dataToParse);
938 if (users::doWeCacheUsers()) {
939 users::insertUser(
static_cast<user_cache_data
>(value));
943 on_voice_state_update_data::on_voice_state_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse,
945 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
946 if (
auto result = parserNew.getErrors(); result.size() > 0) {
947 for (
auto& valueNew: result) {
951 if (sslShard->areWeCollectingData.load(std::memory_order_acquire) && !sslShard->stateUpdateCollected && !sslShard->serverUpdateCollected &&
952 value.userId == sslShard->userId) {
953 sslShard->voiceConnectionData = discord_core_internal::voice_connection_data{};
954 sslShard->voiceConnectionData.sessionId = value.sessionId;
955 sslShard->stateUpdateCollected =
true;
956 }
else if (sslShard->areWeCollectingData.load(std::memory_order_acquire) && !sslShard->stateUpdateCollected && value.userId == sslShard->userId) {
957 sslShard->voiceConnectionData.sessionId = value.sessionId;
958 if (sslShard->voiceConnectionDataBufferMap.contains(value.guildId.operator
const uint64_t&())) {
959 sslShard->voiceConnectionDataBufferMap[value.guildId.operator
const uint64_t&()]->send(std::move(sslShard->voiceConnectionData));
961 sslShard->areWeCollectingData.store(
false, std::memory_order_release);
962 sslShard->serverUpdateCollected =
false;
963 sslShard->stateUpdateCollected =
false;
965 voice_state_data_light voiceDataNew{};
966 voiceDataNew.channelId = value.channelId;
967 voiceDataNew.guildId = value.guildId;
968 voiceDataNew.userId = value.userId;
969 guild_members::insertVoiceState(std::move(voiceDataNew));
972 on_webhook_update_data::on_webhook_update_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
973 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
974 if (
auto result = parserNew.getErrors(); result.size() > 0) {
975 for (
auto& valueNew: result) {
981 on_auto_complete_entry_data::on_auto_complete_entry_data(jsonifier::jsonifier_core<false>& parserNew, jsonifier::string_view_base<uint8_t> dataToParse) {
982 parserNew.parseJson(*
static_cast<event_data*
>(
this), dataToParse);
983 if (
auto result = parserNew.getErrors(); result.size() > 0) {
984 for (
auto& valueNew: result) {
992 return onApplicationCommandPermissionsUpdateEvent.add(std::move(handler));
996 return onApplicationCommandPermissionsUpdateEvent.erase(token);
1001 return onAutoModerationRuleCreationEvent.add(std::move(handler));
1005 return onAutoModerationRuleCreationEvent.erase(token);
1010 return onAutoModerationRuleUpdateEvent.add(std::move(handler));
1014 return onAutoModerationRuleUpdateEvent.erase(token);
1019 return onAutoModerationRuleDeletionEvent.add(std::move(handler));
1023 return onAutoModerationRuleDeletionEvent.erase(token);
1028 return onAutoModerationActionExecutionEvent.add(std::move(handler));
1032 return onAutoModerationActionExecutionEvent.erase(token);
1036 return onAutoCompleteEntryEvent.add(std::move(handler));
1040 return onInputEventCreationEvent.erase(token);
1044 return onInputEventCreationEvent.add(std::move(handler));
1048 return onInputEventCreationEvent.erase(token);
1052 return onChannelCreationEvent.add(std::move(handler));
1056 onChannelCreationEvent.erase(token);
1060 return onChannelUpdateEvent.add(std::move(handler));
1064 onChannelUpdateEvent.erase(token);
1068 return onChannelDeletionEvent.add(std::move(handler));
1072 onChannelDeletionEvent.erase(token);
1076 return onChannelPinsUpdateEvent.add(std::move(handler));
1080 return onChannelPinsUpdateEvent.erase(token);
1084 return onThreadCreationEvent.add(std::move(handler));
1088 return onThreadCreationEvent.erase(token);
1092 return onThreadUpdateEvent.add(std::move(handler));
1096 return onThreadUpdateEvent.erase(token);
1100 return onThreadDeletionEvent.add(std::move(handler));
1104 return onThreadDeletionEvent.erase(token);
1108 return onThreadListSyncEvent.add(std::move(handler));
1112 return onThreadListSyncEvent.erase(token);
1116 return onThreadMemberUpdateEvent.add(std::move(handler));
1120 return onThreadMemberUpdateEvent.erase(token);
1125 return onThreadMembersUpdateEvent.add(std::move(handler));
1129 return onThreadMembersUpdateEvent.erase(token);
1133 return onGuildCreationEvent.add(std::move(handler));
1137 onGuildCreationEvent.erase(token);
1141 return onGuildUpdateEvent.add(std::move(handler));
1145 onGuildUpdateEvent.erase(token);
1149 return onGuildDeletionEvent.add(std::move(handler));
1153 onGuildDeletionEvent.erase(token);
1157 return onGuildBanAddEvent.add(std::move(handler));
1161 onGuildBanAddEvent.erase(token);
1165 return onGuildBanRemoveEvent.add(std::move(handler));
1169 onGuildBanRemoveEvent.erase(token);
1173 return onGuildEmojisUpdateEvent.add(std::move(handler));
1177 onGuildEmojisUpdateEvent.erase(token);
1182 return onGuildStickersUpdateEvent.add(std::move(handler));
1186 onGuildStickersUpdateEvent.erase(token);
1191 return onGuildIntegrationsUpdateEvent.add(std::move(handler));
1195 onGuildIntegrationsUpdateEvent.erase(token);
1199 return onGuildMembersChunkEvent.add(std::move(handler));
1203 onGuildMembersChunkEvent.erase(token);
1207 return onGuildMemberAddEvent.add(std::move(handler));
1211 onGuildMemberAddEvent.erase(token);
1215 return onGuildMemberRemoveEvent.add(std::move(handler));
1219 onGuildMemberRemoveEvent.erase(token);
1223 return onGuildMemberUpdateEvent.add(std::move(handler));
1227 onGuildMemberUpdateEvent.erase(token);
1231 return onRoleCreationEvent.add(std::move(handler));
1235 onRoleCreationEvent.erase(token);
1239 return onRoleUpdateEvent.add(std::move(handler));
1243 onRoleUpdateEvent.erase(token);
1247 return onRoleDeletionEvent.add(std::move(handler));
1251 onRoleDeletionEvent.erase(token);
1256 return onGuildScheduledEventCreationEvent.add(std::move(handler));
1260 onGuildScheduledEventCreationEvent.erase(token);
1265 return onGuildScheduledEventUpdateEvent.add(std::move(handler));
1269 onGuildScheduledEventUpdateEvent.erase(token);
1274 return onGuildScheduledEventDeletionEvent.add(std::move(handler));
1278 onGuildScheduledEventDeletionEvent.erase(token);
1283 return onGuildScheduledEventUserAddEvent.add(std::move(handler));
1287 onGuildScheduledEventUserAddEvent.erase(token);
1292 return onGuildScheduledEventUserRemoveEvent.add(std::move(handler));
1296 onGuildScheduledEventUserRemoveEvent.erase(token);
1301 return onIntegrationCreationEvent.add(std::move(handler));
1305 onIntegrationCreationEvent.erase(token);
1309 return onIntegrationUpdateEvent.add(std::move(handler));
1313 onIntegrationUpdateEvent.erase(token);
1318 return onIntegrationDeletionEvent.add(std::move(handler));
1322 onIntegrationDeletionEvent.erase(token);
1327 return onInteractionCreationEvent.add(std::move(handler));
1331 onInteractionCreationEvent.erase(token);
1335 return onInviteCreationEvent.add(std::move(handler));
1339 onInviteCreationEvent.erase(token);
1343 return onInviteDeletionEvent.add(std::move(handler));
1347 onInviteDeletionEvent.erase(token);
1351 return onMessageCreationEvent.add(std::move(handler));
1355 onMessageCreationEvent.erase(token);
1359 return onMessageUpdateEvent.add(std::move(handler));
1363 onMessageUpdateEvent.erase(token);
1367 return onMessageDeletionEvent.add(std::move(handler));
1371 onMessageDeletionEvent.erase(token);
1375 return onMessageDeleteBulkEvent.add(std::move(handler));
1379 onMessageDeleteBulkEvent.erase(token);
1383 return onReactionAddEvent.add(std::move(handler));
1387 onReactionAddEvent.erase(token);
1391 return onReactionRemoveEvent.add(std::move(handler));
1395 onReactionRemoveEvent.erase(token);
1399 return onReactionRemoveAllEvent.add(std::move(handler));
1403 onReactionRemoveAllEvent.erase(token);
1408 return onReactionRemoveEmojiEvent.add(std::move(handler));
1412 onReactionRemoveEmojiEvent.erase(token);
1416 return onPresenceUpdateEvent.add(std::move(handler));
1420 onPresenceUpdateEvent.erase(token);
1425 return onStageInstanceCreationEvent.add(std::move(handler));
1429 onStageInstanceCreationEvent.erase(token);
1434 return onStageInstanceUpdateEvent.add(std::move(handler));
1438 onStageInstanceUpdateEvent.erase(token);
1443 return onStageInstanceDeletionEvent.add(std::move(handler));
1447 onStageInstanceDeletionEvent.erase(token);
1451 return onTypingStartEvent.add(std::move(handler));
1455 onTypingStartEvent.erase(token);
1459 return onUserUpdateEvent.add(std::move(handler));
1463 onUserUpdateEvent.erase(token);
1467 return onVoiceStateUpdateEvent.add(std::move(handler));
1471 onVoiceStateUpdateEvent.erase(token);
1475 return onVoiceServerUpdateEvent.add(std::move(handler));
1479 onVoiceServerUpdateEvent.erase(token);
1483 return onWebhookUpdateEvent.add(std::move(handler));
1487 onWebhookUpdateEvent.erase(token);
static channel_cache_data getCachedChannel(get_channel_data dataPackage)
Collects a channel from the library's cache.
A co_routine - representing a potentially asynchronous operation/function.
Event-delegate, representing an event function to be executed.
A websocket client, for communication via a tcp-connection.
discord_core_internal::event_delegate_token onInputEventCreation(discord_core_internal::event_delegate< co_routine< void >, const on_input_event_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildStickersUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_stickers_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadMemberUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_thread_member_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onRoleUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_role_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onChannelPinsUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_channel_pins_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onAutoModerationRuleCreation(discord_core_internal::event_delegate< co_routine< void >, const on_auto_moderation_rule_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onRoleCreation(discord_core_internal::event_delegate< co_routine< void >, const on_role_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onIntegrationCreation(discord_core_internal::event_delegate< co_routine< void >, const on_integration_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadCreation(discord_core_internal::event_delegate< co_routine< void >, const on_thread_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onMessageDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_message_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_guild_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_thread_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildMemberRemove(discord_core_internal::event_delegate< co_routine< void >, const on_guild_member_remove_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildScheduledEventDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_guild_scheduled_event_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onChannelCreation(discord_core_internal::event_delegate< co_routine< void >, const on_channel_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onMessageCreation(discord_core_internal::event_delegate< co_routine< void >, const on_message_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadListSync(discord_core_internal::event_delegate< co_routine< void >, const on_thread_list_sync_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onIntegrationDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_integration_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_thread_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildScheduledEventCreation(discord_core_internal::event_delegate< co_routine< void >, const on_guild_scheduled_event_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onReactionRemove(discord_core_internal::event_delegate< co_routine< void >, const on_reaction_remove_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onReactionAdd(discord_core_internal::event_delegate< co_routine< void >, const on_reaction_add_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onReactionRemoveAll(discord_core_internal::event_delegate< co_routine< void >, const on_reaction_remove_all_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onChannelUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_channel_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildScheduledEventUserRemove(discord_core_internal::event_delegate< co_routine< void >, const on_guild_scheduled_event_user_remove_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onVoiceStateUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_voice_state_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onAutoCompleteEntry(discord_core_internal::event_delegate< co_routine< void >, const on_auto_complete_entry_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onVoiceServerUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_voice_server_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildScheduledEventUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_scheduled_event_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildBanAdd(discord_core_internal::event_delegate< co_routine< void >, const on_guild_ban_add_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onMessageDeleteBulk(discord_core_internal::event_delegate< co_routine< void >, const on_message_delete_bulk_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onRoleDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_role_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildIntegrationsUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_integrations_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onInviteDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_invite_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onStageInstanceDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_stage_instance_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildMembersChunk(discord_core_internal::event_delegate< co_routine< void >, const on_guild_members_chunk_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onThreadMembersUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_thread_members_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildCreation(discord_core_internal::event_delegate< co_routine< void >, const on_guild_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onStageInstanceUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_stage_instance_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onInviteCreation(discord_core_internal::event_delegate< co_routine< void >, const on_invite_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onStageInstanceCreation(discord_core_internal::event_delegate< co_routine< void >, const on_stage_instance_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildMemberUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_member_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildEmojisUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_guild_emojis_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onWebhookUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_webhook_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildScheduledEventUserAdd(discord_core_internal::event_delegate< co_routine< void >, const on_guild_scheduled_event_user_add_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onAutoModerationRuleUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_auto_moderation_rule_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onTypingStart(discord_core_internal::event_delegate< co_routine< void >, const on_typing_start_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onReactionRemoveEmoji(discord_core_internal::event_delegate< co_routine< void >, const on_reaction_remove_emoji_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onUserUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_user_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onApplicationCommandsPermissionsUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_application_command_permissions_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onAutoModerationActionExecution(discord_core_internal::event_delegate< co_routine< void >, const on_auto_moderation_action_execution_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onAutoModerationRuleDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_auto_moderation_rule_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildBanRemove(discord_core_internal::event_delegate< co_routine< void >, const on_guild_ban_remove_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onPresenceUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_presence_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onChannelDeletion(discord_core_internal::event_delegate< co_routine< void >, const on_channel_deletion_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onGuildMemberAdd(discord_core_internal::event_delegate< co_routine< void >, const on_guild_member_add_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onInteractionCreation(discord_core_internal::event_delegate< co_routine< void >, const on_interaction_creation_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onIntegrationUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_integration_update_data & > handler)
For adding a function to handle this event.
discord_core_internal::event_delegate_token onMessageUpdate(discord_core_internal::event_delegate< co_routine< void >, const on_message_update_data & > handler)
For adding a function to handle this event.
static guild_member_cache_data getCachedGuildMember(get_guild_member_data dataPackage)
Collects a guild_member from the library's cache.
static guild_cache_data getCachedGuild(get_guild_data dataPackage)
Collects a guild from the library's cache.
static DCA_INLINE void printError(const string_type &what, std::source_location where=std::source_location::current())
Print an error message of the specified type.
static role_cache_data getCachedRole(get_role_data dataPackage)
Collects a given role from the library's cache.
static user_cache_data getCachedUser(get_user_data dataPackage)
Collects a given user from the library's cache.
@ Action_Row
container for other components.
@ 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.
@ Text_Input
Text input object.
@ Message_Component
Message component.
@ Application_Command_Autocomplete
Application command autocomplete.
@ Application_Command
Application command.
@ Modal_Submit
Modal submission.
DCA_INLINE unique_ptr< value_type, deleter > makeUnique(arg_types &&... args)
Helper function to create a unique_ptr for a non-array object.
The main namespace for the forward-facing interfaces.
Struct representing an event delegate token, associated with an event.
Data that is received as part of an application_command_permissions update event.
Data that is received upon the bot receiving an autocomplete entry.
Data that is received as part of an auto_moderation_action execution event.
Data that is received as part of an auto_moderation_rule_data creation event.
Data that is received as part of an auto_moderation_rule_data delete event.
Data that is received as part of an auto_moderation_rule_data update event.
Data that is received as part of a channel creation 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 channel update 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 creation event.
Data that is received as part of a guild deletion event.
Data that is received as part of a guild emojis update event.
Data that is received as part of a guild integration update event.
Data that is received as part of a guild_member add event.
Data that is received as part of a guild_member remove event.
Data that is received as part of a guild_member update event.
Data that is received as part of a guild_members chunk event.
Data that is received as part of a guild_scheduled_event_data creation event.
Data that is received as part of a guild_scheduled_event_data delete event.
Data that is received as part of a guild_scheduled_event_data update event.
Data that is received as part of a guild_scheduled_event_data user add event.
Data that is received as part of a guild_scheduled_event_data user remove event.
Data that is received as part of a guild sticker update event.
Data that is received as part of a guild update event.
Data that is received as part of an integration creation event.
Data that is received as part of an integration deletion event.
Data that is received as part of an integration update event.
Data that is received as part of an interaction creation 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 a message creation event.
Data that is received as part of a message delete bulk event.
Data that is received as part of a message deletion event.
Data that is received as part of a message update event.
Data that is received as part of a presence update event.
Data that is received as part of a reaction add event.
Data that is received as part of a reaction remove all event.
Data that is received as part of a reaction remove event.
Data that is received as part of a reaction remove emoji event.
Data that is received as part of a role_data creation event.
Data that is received as part of a role_data deletion event.
Data that is received as part of a role_data update event.
Data that is received as part of a stage_instance_data creation event.
Data that is received as part of a stage_instance_data deletion event.
Data that is received as part of a stage_instance_data update event.
Data that is received as part of a thread_data creation event.
Data that is received as part of a thread_data deletion event.
Data that is received as part of a thread_data list sync event.
Data that is received as part of a thread_data member update event.
Data that is received as part of a thread_data members update event.
Data that is received as part of a thread_data update 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 server update event.
Data that is received as part of a voice state update event.
Data that is received as part of a web_hook update event.