37 namespace discord_core_internal {
39 template<>
struct websocket_message_data<update_voice_state_data> {
40 websocket_message_data() =
default;
41 websocket_message_data(
const update_voice_state_data& data);
42 unordered_set<jsonifier::string> excludedKeys{};
43 using type = update_voice_state_data;
45 jsonifier::string t{};
48 operator etf_serializer();
51 template<>
struct websocket_message_data<update_voice_state_data_dc> {
52 websocket_message_data() =
default;
53 websocket_message_data(
const update_voice_state_data& data);
54 unordered_set<jsonifier::string> excludedKeys{};
55 using type = update_voice_state_data_dc;
57 jsonifier::string t{};
60 operator etf_serializer();
65namespace jsonifier_internal {
67 template<
bool excludeKeys>
struct serialize_impl<excludeKeys,
discord_core_api::snowflake> {
68 template<jsonifier::concepts::buffer_like buffer_type>
static void op(
const discord_core_api::snowflake& value, buffer_type& buffer, uint64_t& index) {
69 jsonifier::string newString{
static_cast<jsonifier::string
>(value) };
70 serialize<excludeKeys>::op(newString, buffer, index);
74 template<
bool excludeKeys>
struct parse_impl<excludeKeys,
discord_core_api::snowflake> {
76 jsonifier::raw_json_data newString{};
77 parse<excludeKeys>::op(newString, iter, parser);
78 if (newString.getType() == jsonifier::json_type::String) {
79 value = newString.operator jsonifier::string();
81 value = newString.operator uint64_t();
86 template<
bool excludeKeys>
struct serialize_impl<excludeKeys,
discord_core_api::time_stamp> {
87 template<jsonifier::concepts::buffer_like buffer_type>
static void op(
const discord_core_api::time_stamp& value, buffer_type& buffer, uint64_t& index) {
88 jsonifier::string newString{
static_cast<jsonifier::string
>(value) };
89 serialize<excludeKeys>::op(newString, buffer, index);
93 template<
bool excludeKeys>
struct parse_impl<excludeKeys,
discord_core_api::time_stamp> {
95 jsonifier::string newString{};
96 parse<excludeKeys>::op(newString, iter, parser);
97 value =
static_cast<jsonifier::string
>(newString);
105 using value_type = discord_core_api::ready_data;
106 static constexpr auto parseValue = createObject(
"resume_gateway_url", &value_type::resumeGatewayUrl,
"shard", &value_type::shard,
"v", &value_type::v,
"session_id",
107 &value_type::sessionId,
"user", &value_type::user,
"application", &value_type::application,
"_trace", &value_type::trace);
110 template<>
struct core<
discord_core_api::discord_core_internal::websocket_message> {
111 using value_type = discord_core_api::discord_core_internal::websocket_message;
112 static constexpr auto parseValue = createObject(
"op", &value_type::op,
"s", &value_type::s,
"t", &value_type::t);
115 template<
typename oty2>
struct core<
discord_core_api::discord_core_internal::websocket_message_data<oty2>> {
116 using value_type = discord_core_api::discord_core_internal::websocket_message_data<oty2>;
117 static constexpr auto parseValue = createObject(
"d", &value_type::d,
"op", &value_type::op,
"s", &value_type::s);
120 template<>
struct core<
discord_core_api::application_command_permission_data> {
122 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"permission", &value_type::permission,
"type", &value_type::type);
125 template<>
struct core<
discord_core_api::guild_application_command_permissions_data> {
127 static constexpr auto parseValue =
128 createObject(
"application_id", &value_type::applicationId,
"permissions", &value_type::permissions,
"guild_id", &value_type::guildId,
"id", &value_type::id);
133 static constexpr auto parseValue =
134 createObject(
"max_concurrency", &value_type::maxConcurrency,
"remaining", &value_type::remaining,
"reset_after", &value_type::resetAfter,
"total", &value_type::total);
139 static constexpr auto parseValue =
140 createObject(
"application", &value_type::application,
"expires", &value_type::expires,
"scopes", &value_type::scopes,
"user", &value_type::user);
145 static constexpr auto parseValue = createObject(
"allow_list", &value_type::allowList,
"keyword_filter", &value_type::keywordFilter,
"mention_total_limit",
146 &value_type::mentionTotalLimit,
"presets", &value_type::presets);
151 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"name", &value_type::name,
"animated", &value_type::animated);
156 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"name", &value_type::name,
"roles", &value_type::roles,
"require_colons", &value_type::requireColons,
157 "managed", &value_type::managed,
"animated", &value_type::animated,
"available", &value_type::available);
162 static constexpr auto parseValue =
163 createObject(
"membership_state", &value_type::membershipState,
"permissions", &value_type::permissions,
"team_id", &value_type::teamId,
"user", &value_type::user);
168 static constexpr auto parseValue =
169 createObject(
"icon", &value_type::icon,
"id", &value_type::id,
"members", &value_type::members,
"owner_user_id", &value_type::ownerUserId);
174 static constexpr auto parseValue = createObject(
"scopes", &value_type::scopes,
"permissions", &value_type::permissions);
179 static constexpr auto parseValue =
180 createObject(
"bot_public", &value_type::botPublic,
"bot_require_code_grant", &value_type::botRequireCodeGrant,
"cover_image", &value_type::coverImage,
181 "custom_install_url", &value_type::customInstallUrl,
"description", &value_type::description,
"flags", &value_type::flags,
"guild_id", &value_type::guildId,
"icon",
182 &value_type::icon,
"name", &value_type::name,
"owner", &value_type::owner,
"params", &value_type::params,
"primary_sku_id", &value_type::primarySkuId,
183 "privacy_policy_url", &value_type::privacyPolicyUrl,
"rpc_origins", &value_type::rpcOrigins,
"slug", &value_type::slug,
"summary", &value_type::summary,
"tags",
184 &value_type::tags,
"team", &value_type::team,
"terms_of_service_url", &value_type::termsOfServiceUrl,
"verify_key", &value_type::verifyKey);
189 static constexpr auto parseValue = createObject(
"archived", &value_type::archived,
"archived_timestamp", &value_type::archiveTimestamp,
"auto_archive_duration",
190 &value_type::autoArchiveDuration,
"invitable", &value_type::invitable,
"locked", &value_type::locked);
195 static constexpr auto parseValue = createObject(
"session_start_limit", &value_type::sessionStartLimit,
"shards", &value_type::shards,
"url", &value_type::url);
199 using value_type = discord_core_api::user_id_base;
200 static constexpr auto parseValue = createObject(
"id", &value_type::id);
205 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"username", &value_type::userName,
"discriminator", &value_type::discriminator,
"global_name",
206 &value_type::globalName,
"avatar", &value_type::avatar,
"bot", &value_type::bot,
"system", &value_type::system,
"mfa_enabled", &value_type::mfaEnabled,
"banner",
207 &value_type::banner,
"accentColor", &value_type::accentColor,
"locale", &value_type::locale,
"verified", &value_type::verified,
"email", &value_type::email,
"flags",
208 &value_type::flags,
"premium_type", &value_type::premiumType,
"public_flags", &value_type::publicFlags,
"avatar_decoration", &value_type::avatarDecoration);
213 static constexpr auto parseValue =
214 createObject(
"channel_id", &value_type::channelId,
"description", &value_type::description,
"emoji_id", &value_type::emojiId,
"emoji_name", &value_type::emojiName);
219 static constexpr auto parseValue = createObject(
"description", &value_type::description,
"welcome_screen_channels", &value_type::welcomeChannels);
224 static constexpr auto parseValue = createObject(
"channel_id", &value_type::channelId,
"duration_seconds", &value_type::durationSeconds);
229 static constexpr auto parseValue = createObject(
"meta_data", &value_type::metadata,
"type", &value_type::type);
234 static constexpr auto parseValue =
235 createObject(
"approximate_member_count", &value_type::approximateMemberCount,
"approximate_presence_count", &value_type::approximatePresenceCount,
"description",
236 &value_type::description,
"discovery_splash", &value_type::discoverySplash,
"emojis", &value_type::emojis,
"features", &value_type::features,
"icon",
237 &value_type::icon,
"id", &value_type::id,
"name", &value_type::name,
"splash", &value_type::splash,
"stickers", &value_type::stickers);
242 static constexpr auto parseValue = createObject(
"flags", &value_type::flags,
"join_timestamp", &value_type::joinTimestamp,
"user_id", &value_type::userId);
247 static constexpr auto parseValue = createObject(
"audit_log_entries", &value_type::auditLogEntries,
"auto_moderation_rules", &value_type::autoModerationRules,
248 "guild_scheduled_events", &value_type::guildScheduledEvents,
"integrations", &value_type::integrations,
"threads", &value_type::threads,
"users", &value_type::users,
249 "webhooks", &value_type::webhooks);
254 static constexpr auto parseValue = createObject(
"failed_due_to_perms", &value_type::failedDueToPerms,
"reason", &value_type::reason,
"user", &value_type::user);
259 static constexpr auto parseValue =
260 createObject(
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"self_deaf", &value_type::selfDeaf,
"self_mute", &value_type::selfMute);
265 static constexpr auto parseValue =
266 createObject(
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"self_deaf", &value_type::selfDeaf,
"self_mute", &value_type::selfMute);
271 static constexpr auto parseValue = createObject(
"channel_id", &value_type::channelId,
"enabled", &value_type::enabled);
276 static constexpr auto parseValue = createObject(
"permission_overwrites", &value_type::permissionOverwrites,
"default_reaction_emoji", &value_type::defaultReactionEmoji,
277 "available_tags", &value_type::availableTags,
"default_thread_rate_limit_per_user", &value_type::defaultThreadRateLimitPerUser,
"applied_tags",
278 &value_type::appliedTags,
"default_forum_layout", &value_type::defaultForumLayout,
"default_auto_archive_duration", &value_type::defaultAutoArchiveDuration,
279 "thread_metadata", &value_type::threadMetadata,
"recipients", &value_type::recipients,
"default_sort_order", &value_type::defaultSortOrder,
"last_pin_timestamp",
280 &value_type::lastPinTimestamp,
"last_message_id", &value_type::lastMessageId,
"application_id", &value_type::applicationId,
"total_message_sent",
281 &value_type::totalMessageSent,
"rate_limit_per_user", &value_type::rateLimitPerUser,
"video_quality_mode", &value_type::videoQualityMode,
"member", &value_type::member,
282 "permissions", &value_type::permissions,
"rtc_region", &value_type::rtcRegion,
"message_count", &value_type::messageCount,
"owner_id", &value_type::ownerId,
283 "member_count", &value_type::memberCount,
"flags", &value_type::flags,
"topic", &value_type::topic,
"user_limit", &value_type::userLimit,
"parent_id",
284 &value_type::parentId,
"type", &value_type::type,
"guild_id", &value_type::guildId,
"position", &value_type::position,
"name", &value_type::name,
"icon",
285 &value_type::icon,
"bitrate", &value_type::bitrate,
"id", &value_type::id,
"managed", &value_type::managed,
"nsfw", &value_type::nsfw);
290 static constexpr auto parseValue =
291 createObject(
"user", &value_type::user,
"nick", &value_type::nick,
"avatar", &value_type::avatar,
"roles", &value_type::roles,
"joined_at", &value_type::joinedAt,
292 "premium_since", &value_type::premiumSince,
"deaf", &value_type::deaf,
"mute", &value_type::mute,
"flags", &value_type::flags,
"pending", &value_type::pending,
293 "permissions", &value_type::permissions,
"communication_disabled_until", &value_type::communicationDisabledUntil,
"guild_id", &value_type::guildId);
298 static constexpr auto parseValue =
299 createObject(
"members", &value_type::members,
"channel_ids", &value_type::channelIds,
"threads", &value_type::threads,
"guild_id", &value_type::guildId);
304 static constexpr auto parseValue = createObject(
"options", &value_type::options,
"values", &value_type::values,
"components", &value_type::components,
"type",
305 &value_type::type,
"component_type", &value_type::componentType,
"custom_id", &value_type::customId,
"name", &value_type::name,
"resolved", &value_type::resolved,
306 "target_id", &value_type::targetId,
"guild_id", &value_type::guildId,
"id", &value_type::id);
311 static constexpr auto parseValue = createObject(
"attachments", &value_type::attachments,
"members", &value_type::members,
"messages", &value_type::messages,
"channels",
312 &value_type::channels,
"users", &value_type::users,
"roles", &value_type::roles);
315 template<>
struct core<
discord_core_api::application_command_interaction_data_option> {
317 static constexpr auto parseValue =
318 createObject(
"name", &value_type::name,
"type", &value_type::type,
"value", &value_type::value,
"focused", &value_type::focused,
"options", &value_type::options);
323 static constexpr auto parseValue = createObject(
"app_permissions", &value_type::appPermissions,
"guild_locale", &value_type::guildLocale,
"data", &value_type::data,
324 "locale", &value_type::locale,
"member", &value_type::member,
"application_id", &value_type::applicationId,
"token", &value_type::token,
"message",
325 &value_type::message,
"channel", &value_type::channel,
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"guild", &value_type::guild,
"version",
326 &value_type::version,
"user", &value_type::user,
"id", &value_type::id,
"type", &value_type::type);
331 static constexpr auto parseValue = createObject(
"response_type", &value_type::responseType,
"interaction_data", &value_type::interactionData);
336 static constexpr auto parseValue = createObject(
"added_members", &value_type::addedMembers,
"member_count", &value_type::memberCount,
"guild_id", &value_type::guildId,
337 "removed_member_ids", &value_type::removedMemberIds);
342 static constexpr auto parseValue = createObject(
"application_id", &value_type::applicationId,
"avatar", &value_type::avatar,
"channel_id", &value_type::channelId,
343 "guild_id", &value_type::guildId,
"id", &value_type::id,
"name", &value_type::name,
"source_channel", &value_type::sourceChannel,
"source_guild",
344 &value_type::sourceGuild,
"token", &value_type::token,
"type", &value_type::type,
"url", &value_type::url,
"user", &value_type::user);
349 static constexpr auto parseValue = createObject(
"key", &value_type::key,
"new_value", &value_type::newValue,
"old_value", &value_type::oldValue);
354 static constexpr auto parseValue = createObject(
"delete_member_days", &value_type::deleteMemberDays,
"members_removed", &value_type::membersRemoved,
"application_id",
355 &value_type::applicationId,
"role_name", &value_type::roleName,
"channel_id", &value_type::channelId,
"message_id", &value_type::messageId,
"count", &value_type::count,
356 "type", &value_type::type);
361 static constexpr auto parseValue = createObject(
"has_more", &value_type::hasMore,
"member", &value_type::members,
"threads", &value_type::threads);
366 static constexpr auto parseValue = createObject(
"friend_sync", &value_type::friendSync,
"id", &value_type::id,
"integrations", &value_type::integrations,
"name",
367 &value_type::name,
"revoked", &value_type::revoked,
"show_activity", &value_type::showActivity,
"type", &value_type::type,
"verified", &value_type::verified,
368 "visibility", &value_type::visibility);
373 static constexpr auto parseValue = createObject(
"count", &value_type::count);
378 static constexpr auto parseValue = createObject(
"application_id", &value_type::applicationId,
"applied_tags", &value_type::appliedTags,
"available_tags",
379 &value_type::availableTags,
"guild_id", &value_type::guildId,
"bitrate", &value_type::bitrate,
"default_auto_archive_duration", &value_type::defaultAutoArchiveDuration,
380 "default_reaction_emoji", &value_type::defaultReactionEmoji,
"flags", &value_type::flags,
"icon", &value_type::icon,
"id", &value_type::id,
"last_message_id",
381 &value_type::lastMessageId,
"last_pin_timestamp", &value_type::lastPinTimestamp,
"member", &value_type::member,
"member_count", &value_type::memberCount,
382 "message_count", &value_type::messageCount,
"name", &value_type::name,
"owner_id", &value_type::ownerId,
"parent_id", &value_type::parentId,
"permission_overwrites",
383 &value_type::permissionOverwrites,
"permissions", &value_type::permissions,
"position", &value_type::position,
"rate_limit_per_user", &value_type::rateLimitPerUser,
384 "recipients", &value_type::recipients,
"rtc_region", &value_type::rtcRegion,
"thread_metadata", &value_type::threadMetadata,
"topic", &value_type::topic,
385 "total_message_sent", &value_type::totalMessageSent,
"type", &value_type::type,
"user_limit", &value_type::userLimit,
"video_quality_mode",
386 &value_type::videoQualityMode);
391 static constexpr auto parseValue = createObject(
"allow", &value_type::allow,
"deny", &value_type::deny,
"id", &value_type::id,
"type", &value_type::type);
396 static constexpr auto parseValue = createObject(
"emoji_id", &value_type::emojiId,
"emoji_name", &value_type::emojiName,
"id", &value_type::id,
"moderated",
397 &value_type::moderated,
"name", &value_type::name);
401 using value_type = discord_core_api::default_reaction_data;
402 static constexpr auto parseValue = createObject(
"emoji_id", &value_type::emojiId,
"emoji_name", &value_type::emojiName);
407 static constexpr auto parseValue =
408 createObject(
"custom", &value_type::custom,
"depracated", &value_type::deprecated,
"id", &value_type::id,
"name", &value_type::name,
"optimal", &value_type::optimal);
413 static constexpr auto parseValue =
414 createObject(
"approximate_member_count", &value_type::approximateMemberCount,
"approximate_presence_count", &value_type::approximatePresenceCount,
"channel",
415 &value_type::channel,
"guild_id", &value_type::guildId,
"code", &value_type::code,
"created_at", &value_type::createdAt,
"expires_at", &value_type::expiresAt,
416 "guild", &value_type::guild,
"guild_scheduled_event", &value_type::guildScheduledEvent,
"inviter", &value_type::inviter,
"max_age", &value_type::maxAge,
"max_uses",
417 &value_type::maxUses,
"stage_instance", &value_type::stageInstance,
"target_application", &value_type::targetApplication,
"target_type", &value_type::targetType,
418 "target_user", &value_type::targetUser,
"temporary", &value_type::temporary,
"uses", &value_type::uses);
423 static constexpr auto parseValue = createObject(
"actions", &value_type::actions,
"creator_id", &value_type::creatorId,
"enabled", &value_type::enabled,
"guild_id",
424 &value_type::guildId,
"event_type", &value_type::eventType,
"exempt_channels", &value_type::exemptChannels,
"exempt_roles", &value_type::exemptRoles,
"id",
425 &value_type::id,
"trigger_meta_data", &value_type::triggerMetaData,
"trigger_type", &value_type::triggerType);
430 static constexpr auto parseValue = createObject(
"application_id", &value_type::applicationId,
"default_member_permissions", &value_type::defaultMemberPermissions,
431 "description", &value_type::description,
"guild_id", &value_type::guildId,
"description_localizations", &value_type::descriptionLocalizations,
"dm_permission",
432 &value_type::dmPermission,
"id", &value_type::id,
"name", &value_type::name,
"name_localizations", &value_type::nameLocalizations,
"options", &value_type::options,
433 "type", &value_type::type,
"version", &value_type::version);
438 static constexpr auto parseValue = createObject(
"asset", &value_type::asset,
"description", &value_type::description,
"format_type", &value_type::formatType,
"id",
439 &value_type::id,
"name", &value_type::name,
"pack_id", &value_type::packId,
"tags", &value_type::tags,
"type", &value_type::type,
"user", &value_type::user,
"guild_id",
440 &value_type::guildId,
"sort_value", &value_type::sortValue,
"nsfw_level", &value_type::nsfwLevel,
"flags", &value_type::flags);
445 static constexpr auto parseValue = createObject(
"type", &value_type::type,
"party_id", &value_type::partyId);
450 static constexpr auto parseValue = createObject(
"has_more", &value_type::hasMore,
"members", &value_type::members,
"threads", &value_type::threads);
454 using value_type = discord_core_api::client_status;
455 static constexpr auto parseValue = createObject(
"web", &value_type::web,
"mobile", &value_type::mobile,
"desktop", &value_type::desktop);
460 static constexpr auto parseValue = createObject(
"name", &value_type::name,
"type", &value_type::type,
"url", &value_type::url,
"state", &value_type::state,
"created_at",
461 &value_type::createdAt,
"details", &value_type::details,
"application_id", &value_type::applicationId);
466 static constexpr auto parseValue = createObject(
"client_status", &value_type::clientStatus,
"guild_id", &value_type::guildId,
"status", &value_type::status,
"user",
467 &value_type::user,
"activities", &value_type::activities);
472 static constexpr auto parseValue = createObject(
"name", &value_type::name);
477 static constexpr auto parseValue = createObject(
"author", &value_type::author,
"color", &value_type::hexColorValue,
"description", &value_type::description,
"fields",
478 &value_type::fields,
"footer", &value_type::footer,
"image", &value_type::image,
"provider", &value_type::provider,
"thumbnail", &value_type::thumbnail,
"timestamp",
479 &value_type::timeStamp,
"title", &value_type::title,
"type", &value_type::type,
"url", &value_type::url,
"video", &value_type::video);
484 static constexpr auto parseValue = createObject(
"activity", &value_type::activity,
"application", &value_type::application,
"application_id", &value_type::applicationId,
485 "attachments", &value_type::attachments,
"author", &value_type::author,
"channel_id", &value_type::channelId,
"components", &value_type::components,
"content",
486 &value_type::content,
"edited_timestamp", &value_type::editedTimestamp,
"embeds", &value_type::embeds,
"flags", &value_type::flags,
"guild_id", &value_type::guildId,
487 "id", &value_type::id,
"interaction", &value_type::interaction,
"mention_channels", &value_type::mentionChannels,
"mention_everyone", &value_type::mentionEveryone,
488 "mention_roles", &value_type::mentionRoles,
"mentions", &value_type::mentions,
"message_reference", &value_type::messageReference,
"nonce", &value_type::nonce,
489 "pinned", &value_type::pinned,
"reactions", &value_type::reactions,
"sticker_items", &value_type::stickerItems,
"stickers", &value_type::stickers,
"thread",
490 &value_type::thread,
"timestamp", &value_type::timeStamp,
"tts", &value_type::tts,
"type", &value_type::type,
"webhook_id", &value_type::webHookId);
495 static constexpr auto parseValue =
496 createObject(
"channel_id", &value_type::channelId,
"count", &value_type::count,
"emoji", &value_type::emoji,
"guild_id", &value_type::guildId,
"id", &value_type::id,
497 "member", &value_type::member,
"me", &value_type::me,
"message_id", &value_type::messageId,
"user_id", &value_type::userId);
502 static constexpr auto parseValue = createObject(
"format_type", &value_type::formatType,
"name", &value_type::name);
507 static constexpr auto parseValue = createObject(
"content_type", &value_type::contentType,
"description", &value_type::description,
"filename", &value_type::filename,
508 "height", &value_type::height,
"id", &value_type::id,
"proxy_url", &value_type::proxyUrl,
"size", &value_type::size,
"url", &value_type::url,
"width",
509 &value_type::width,
"ephemeral", &value_type::ephemeral);
514 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"guild_id", &value_type::guildId,
"name", &value_type::name,
"type", &value_type::type);
518 using value_type = discord_core_api::select_default_value_data;
519 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"type", &value_type::type);
524 static constexpr auto parseValue = createObject(
"components", &value_type::components,
"type", &value_type::type);
529 static constexpr auto parseValue = createObject(
"proxy_icon_url", &value_type::proxyIconUrl,
"icon_url", &value_type::iconUrl,
"text", &value_type::text);
534 static constexpr auto parseValue = createObject(
"proxy_url", &value_type::proxyUrl,
"url", &value_type::url,
"height", &value_type::height,
"width", &value_type::width);
539 static constexpr auto parseValue = createObject(
"proxy_url", &value_type::proxyUrl,
"url", &value_type::url,
"height", &value_type::height,
"width", &value_type::width);
544 static constexpr auto parseValue = createObject(
"proxy_url", &value_type::proxyUrl,
"url", &value_type::url,
"height", &value_type::height,
"width", &value_type::width);
549 static constexpr auto parseValue = createObject(
"name", &value_type::name,
"url", &value_type::url);
554 static constexpr auto parseValue =
555 createObject(
"proxy_icon_url", &value_type::proxyIconUrl,
"icon_url", &value_type::iconUrl,
"name", &value_type::name,
"url", &value_type::url);
560 static constexpr auto parseValue = createObject(
"name", &value_type::name,
"value", &value_type::value,
"inline", &value_type::Inline);
565 static constexpr auto parseValue = createObject(
"avatar", &value_type::avatar,
"flags", &value_type::flags,
"guild_id", &value_type::guildId,
"joined_at",
566 &value_type::joinedAt,
"nick", &value_type::nick,
"permissions", &value_type::permissionsVal,
"roles", &value_type::roles,
"user", &value_type::user);
571 static constexpr auto parseValue = createObject(
"action_type", &value_type::actionType,
"changes", &value_type::changes,
"created_at", &value_type::createdTimeStamp,
"id",
572 &value_type::id,
"options", &value_type::options,
"reason", &value_type::reason,
"target_id", &value_type::targetId,
"user_id", &value_type::userId);
576 using value_type = discord_core_api::component_data;
577 static constexpr auto parseValue = createObject(
"type", &value_type::type,
"custom_id", &value_type::customId,
"options", &value_type::options,
"channel_types",
578 &value_type::channelTypes,
"placeholder", &value_type::placeholder,
"min_values", &value_type::minValues,
"max_values", &value_type::maxValues,
"min_length",
579 &value_type::minLength,
"max_length", &value_type::maxLength,
"label", &value_type::label,
"value", &value_type::value,
"title", &value_type::title,
"emoji",
580 &value_type::emoji,
"url", &value_type::url,
"required", &value_type::required,
"disabled", &value_type::disabled,
"style", &value_type::style);
585 static constexpr auto parseValue = createObject(
"description", &value_type::description,
"label", &value_type::label,
"value", &value_type::value,
"emoji",
586 &value_type::emoji,
"default", &value_type::_default);
591 static constexpr auto parseValue = createObject(
"channel_id", &value_type::channelId,
"guild_id", &value_type::guildId,
"user_id", &value_type::userId);
596 static constexpr auto parseValue = createObject(
"default_message_notifications", &value_type::defaultMessageNotifications,
"guild_scheduled_events",
597 &value_type::guildScheduledEvents,
"explicit_content_filter", &value_type::explicitContentFilter,
"stage_instances", &value_type::stageInstances,
"presences",
598 &value_type::presences,
"system_channel_flags", &value_type::systemChannelFlags,
"widget_enabled", &value_type::widgetEnabled,
"unavailable", &value_type::unavailable,
599 "owner", &value_type::owner,
"large", &value_type::large,
"member_count", &value_type::memberCount,
"verification_level", &value_type::verificationLevel,
"id",
600 &value_type::id,
"channels", &value_type::channels,
"roles", &value_type::roles,
"members", &value_type::members,
"voice_states", &value_type::voiceStates,
"owner_id",
601 &value_type::ownerId,
"permissions", &value_type::permissions,
"afk_channel_id", &value_type::afkChannelId,
"features", &value_type::features,
"stickers",
602 &value_type::stickers,
"max_stage_video_channel_users", &value_type::maxStageVideoChannelUsers,
"public_updates_channel_id", &value_type::publicUpdatesChannelId,
603 "premium_subscription_count", &value_type::premiumSubscriptionCount,
"approximate_presence_count", &value_type::approximatePresenceCount,
"threads",
604 &value_type::threads,
"welcome_screen", &value_type::welcomeScreen,
"safety_alerts_channel_id", &value_type::safetyAlertsChannelId,
"approximate_member_count",
605 &value_type::approximateMemberCount,
"premium_progress_bar_enabled", &value_type::premiumProgressBarEnabled,
"max_video_channel_users",
606 &value_type::maxVideoChannelUsers,
"emoji", &value_type::emoji,
"preferred_locale", &value_type::preferredLocale,
"vanity_url_code", &value_type::vanityUrlCode,
607 "system_channel_id", &value_type::systemChannelId,
"discovery_splash", &value_type::discoverySplash,
"widget_channel_id", &value_type::widgetChannelId,
608 "rules_channel_id", &value_type::rulesChannelId,
"nsfw_level", &value_type::nsfwLevel,
"application_id", &value_type::applicationId,
"description",
609 &value_type::description,
"premium_tier", &value_type::premiumTier,
"afk_timeout", &value_type::afkTimeout,
"max_members", &value_type::maxMembers,
"mfa_level",
610 &value_type::mfaLevel,
"splash", &value_type::splash,
"name", &value_type::name,
"banner", &value_type::banner,
"icon", &value_type::icon);
614 using value_type = discord_core_api::partial_guild_data;
615 static constexpr auto parseValue = createObject(
"unavailable", &value_type::unavailable,
"id", &value_type::id);
620 static constexpr auto parseValue = createObject(
"account", &value_type::account,
"application", &value_type::application,
"enabled", &value_type::enabled,
621 "enable_emoticons", &value_type::enableEmoticons,
"expire_behavior", &value_type::expireBehavior,
"expire_grace_period", &value_type::expireGracePeriod,
"id",
622 &value_type::id,
"name", &value_type::name,
"revoked", &value_type::revoked,
"role_id", &value_type::roleId,
"subscriber_count", &value_type::subscriberCount,
623 "syncing", &value_type::syncing,
"synced_at", &value_type::syncedAt,
"type", &value_type::type,
"user", &value_type::user);
628 static constexpr auto parseValue = createArray(&value_type::data);
633 static constexpr auto parseValue =
634 createObject(
"replied_user", &value_type::repliedUser,
"parse", &value_type::parse,
"roles", &value_type::roles,
"users", &value_type::users);
639 static constexpr auto parseValue = createObject(
"fail_if_not_exists", &value_type::failIfNotExists,
"message_id", &value_type::messageId,
"channel_id",
640 &value_type::channelId,
"guild_id", &value_type::guildId);
645 static constexpr auto parseValue =
646 createObject(
"id", &value_type::id,
"member", &value_type::member,
"name", &value_type::name,
"type", &value_type::type,
"user", &value_type::user);
651 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"privacy_level", &value_type::privacyLevel,
"entity_metadata", &value_type::entityMetadata,
652 "entity_type", &value_type::entityType,
"status", &value_type::status,
"scheduled_start_time", &value_type::scheduledStartTime,
"scheduled_end_time",
653 &value_type::scheduledEndTime,
"description", &value_type::description,
"creator_id", &value_type::creatorId,
"channel_id", &value_type::channelId,
"entity_id",
654 &value_type::entityId,
"user_count", &value_type::userCount,
"guild_id", &value_type::guildId,
"creator", &value_type::creator,
"name", &value_type::name);
659 static constexpr auto parseValue = createObject(
"guild_scheduled_event_id", &value_type::guildScheduledEventId,
"member", &value_type::member,
"user", &value_type::user);
664 static constexpr auto parseValue = createObject(
"location", &value_type::location);
669 static constexpr auto parseValue = createObject(
"id", &value_type::id,
"name", &value_type::name,
"color", &value_type::color,
"hoist", &value_type::hoist,
"icon",
670 &value_type::icon,
"unicode_emoji", &value_type::unicodeEmoji,
"position", &value_type::position,
"permissions", &value_type::permissions,
"managed",
671 &value_type::managed,
"mentionable", &value_type::mentionable,
"tags", &value_type::tags,
"flags", &value_type::flags);
676 static constexpr auto parseValue = createObject(
"activity", &value_type::activity,
"application", &value_type::application,
"application_id", &value_type::applicationId,
677 "attachments", &value_type::attachments,
"author", &value_type::author,
"channel_id", &value_type::channelId,
"components", &value_type::components,
"content",
678 &value_type::content,
"edited_timestamp", &value_type::editedTimestamp,
"embeds", &value_type::embeds,
"flags", &value_type::flags,
"guild_id", &value_type::guildId,
679 "id", &value_type::id,
"interaction", &value_type::interaction,
"member", &value_type::member,
"mention_channels", &value_type::mentionChannels,
"mention_everyone",
680 &value_type::mentionEveryone,
"mention_roles", &value_type::mentionRoles,
"mentions", &value_type::mentions,
"message_reference", &value_type::messageReference,
681 "nonce", &value_type::nonce,
"pinned", &value_type::pinned,
"reactions", &value_type::reactions,
"referenced_message", &value_type::referencedMessage,
"sticker_items",
682 &value_type::stickerItems,
"stickers", &value_type::stickers,
"thread", &value_type::thread,
"timestamp", &value_type::timeStamp,
"tts", &value_type::tts,
"type",
683 &value_type::type,
"webhook_id", &value_type::webHookId);
688 static constexpr auto parseValue = createObject(
"banner_asset_id", &value_type::bannerAssetId,
"cover_sticker_id", &value_type::coverStickerId,
"description",
689 &value_type::description,
"id", &value_type::id,
"name", &value_type::name,
"sku_id", &value_type::skuId,
"stickers", &value_type::stickers);
694 static constexpr auto parseValue = createObject(
"url", &value_type::url);
699 static constexpr auto parseValue = createObject(
"code", &value_type::code,
"created_at", &value_type::createdAt,
"creator", &value_type::creator,
"creator_id",
700 &value_type::creatorId,
"description", &value_type::description,
"is_dirty", &value_type::isDirty,
"name", &value_type::name,
"serialized_source_guild",
701 &value_type::serializedSourceGuild,
"source_guild_id", &value_type::sourceGuildId,
"updated_at", &value_type::updatedAt);
706 static constexpr auto parseValue = createObject(
"type", &value_type::type,
"name", &value_type::name,
"description", &value_type::description,
"required",
707 &value_type::required,
"autocomplete", &value_type::autocomplete,
"min_value", &value_type::minValue,
"max_value", &value_type::maxValue,
"channel_types",
708 &value_type::channelTypes,
"description_localizations", &value_type::descriptionLocalizations,
"name_localizations", &value_type::nameLocalizations,
"choices",
709 &value_type::choices,
"options", &value_type::options);
714 static constexpr auto parseValue = createObject(
"privacy_level", &value_type::privacyLevel,
"discoverable_disabled", &value_type::discoverableDisabled,
"channel_id",
715 &value_type::channelId,
"guild_id", &value_type::guildId,
"topic", &value_type::topic);
718 template<>
struct core<
discord_core_api::application_command_option_choice_data> {
720 static constexpr auto parseValue = createObject(
"name", &value_type::name,
"value", &value_type::value,
"name_localizations", &value_type::nameLocalizations);
725 static constexpr auto parseValue =
726 createObject(
"premium_subscriber", &value_type::premiumSubscriber,
"integration_id", &value_type::integrationId,
"bot_id", &value_type::botId);
729 template<>
struct core<
discord_core_api::discord_core_internal::connect_properties> {
730 using value_type = discord_core_api::discord_core_internal::connect_properties;
731 static constexpr auto parseValue = createObject(
"os", &value_type::os,
"device", &value_type::device,
"browser", &value_type::browser);
734 template<>
struct core<
discord_core_api::discord_core_internal::websocket_identify_data> {
735 using value_type = discord_core_api::discord_core_internal::websocket_identify_data;
736 static constexpr auto parseValue = createObject(
"token", &value_type::botToken,
"shard", &value_type::shard,
"intents", &value_type::intents,
"large_threshold",
737 &value_type::largeThreshold,
"presence", &value_type::presence,
"properties", &value_type::properties);
740 template<>
struct core<
discord_core_api::discord_core_internal::websocket_resume_data> {
741 using value_type = discord_core_api::discord_core_internal::websocket_resume_data;
742 static constexpr auto parseValue = createObject(
"token", &value_type::botToken,
"session_id", &value_type::sessionId,
"seq", &value_type::lastNumberReceived);
745 template<>
struct core<
discord_core_api::discord_core_internal::voice_socket_protocol_payload_data_data> {
746 using value_type = discord_core_api::discord_core_internal::voice_socket_protocol_payload_data_data;
747 static constexpr auto parseValue = createObject(
"address", &value_type::address,
"mode", &value_type::mode,
"port", &value_type::port);
750 template<>
struct core<
discord_core_api::discord_core_internal::voice_socket_protocol_payload_data> {
751 using value_type = discord_core_api::discord_core_internal::voice_socket_protocol_payload_data;
752 static constexpr auto parseValue = createObject(
"data", &value_type::data,
"protocol", &value_type::protocol);
755 template<>
struct core<
discord_core_api::discord_core_internal::voice_identify_data> {
756 using value_type = discord_core_api::discord_core_internal::voice_identify_data;
757 static constexpr auto parseValue =
758 createObject(
"session_id", &value_type::sessionId,
"user_id", &value_type::userId,
"token", &value_type::token,
"server_id", &value_type::serverId);
761 template<>
struct core<
discord_core_api::discord_core_internal::send_speaking_data> {
762 using value_type = discord_core_api::discord_core_internal::send_speaking_data;
763 static constexpr auto parseValue = createObject(
"speaking", &value_type::type,
"delay", &value_type::delay,
"ssrc", &value_type::ssrc);
766 template<>
struct core<
discord_core_api::discord_core_internal::hello_data> {
767 using value_type = discord_core_api::discord_core_internal::hello_data;
768 static constexpr auto parseValue = createObject(
"heartbeat_interval", &value_type::heartbeatInterval,
"_trace", &value_type::_trace);
773 static constexpr auto parseValue =
774 createObject(
"afk", &value_type::afk,
"since", &value_type::since,
"status", &value_type::statusReal,
"activities", &value_type::activities);
777 template<
typename value_type>
struct core<
discord_core_api::event_data<value_type>> {
778 using value_type02 = discord_core_api::event_data<value_type>;
779 static constexpr auto parseValue = createObject(
"d", &value_type02::value);
782 template<
typename value_type,
typename value_type01>
struct core<
discord_core_api::updated_event_data<value_type, value_type01>> {
783 using value_type02 = discord_core_api::updated_event_data<value_type, value_type01>;
784 static constexpr auto parseValue = createObject(
"d", &value_type02::value);
Action row data of message components.
Allowable mentions for a message.
Data structure representing an application_command_data.
Data structure representing an application_command_data's option choice.
Permissions data for an application_command_data.
Represents an auto-moderation-rule.
Channel_data mention data.
Data structure representing a single emoji.
Represents the permissions for accessing an application_command_data from within a guild.
A discord guild. used to connect to/disconnect from voice.
Data structure representing a single guild_member_data.
Data structure representing a single guild_member_data.
Data representing a guild scheduled event.
The core of a message's data structure.
Data structure representing a single message_data.
Message interaction data.
audit log entry info data
A permission_types overwrite, for a given channel.
Data structure representing a single emoji.
/// data structure representing a single reaction.
Represents a single selection from a select-menu.
A class representing a snowflake identifier with various operations.
Data representing a single sticker_data.
Message sticker_data item data.
Represents a single thread_data.
Data for a single member of a thread_data.
Represents a thread_data-members-update.
A class that extends time_stamp_base to provide additional functionality.
The main namespace for the forward-facing interfaces.
For representing a single auto-moderation-rule-action.
Data representing an active thread_data.
Application_command_data interaction data option.
Data structure representing an application_command_data's option.
Data representing an archived thread_data.
Authorization info structure.
Represents a single user_data connection.
Data representing a file to be sent via multipart-form data.
Data from the get_gateway_bot endpoint.
Data representing a single guild preview.
Data representing a single guild_scheduled_event_user.
Represents a guild template.
Install params data, for application data.
Data from the session_start info.
Represents a sticker_data pack.
Team members object data.
Data for when threads are synced.
For updating a user's presence.
For updating the current voice state.
For updating the current voice state.
Structure representing voice region data.
Welcome screen channel_data data.