36 namespace discord_core_internal {
38 struct voice_connection_data {
39 jsonifier::string sessionId{};
40 jsonifier::string endPoint{};
41 jsonifier::string token{};
44 struct DiscordCoreAPI_Dll websocket_resume_data {
45 uint64_t lastNumberReceived{};
46 jsonifier::string sessionId{};
47 jsonifier::string botToken{};
49 operator discord_core_internal::etf_serializer();
52 struct connect_properties {
53 jsonifier::string_view browser{
"DiscordCoreAPI" };
54 jsonifier::string_view device{
"DiscordCoreAPI" };
56 jsonifier::string_view os{
"Windows" };
58 jsonifier::string_view os{
"Linux" };
60 jsonifier::string_view os{
"MacOs" };
64 struct DiscordCoreAPI_Dll websocket_identify_data {
65 update_presence_data presence{ presence_update_state::online };
66 std::array<uint64_t, 2> shard{};
67 connect_properties properties{};
68 uint64_t largeThreshold{ 250 };
69 jsonifier::string botToken{};
72 operator discord_core_internal::etf_serializer();
75 struct voice_socket_protocol_payload_data_data {
76 jsonifier::string address{};
77 jsonifier::string mode{};
81 struct voice_socket_protocol_payload_data {
82 voice_socket_protocol_payload_data_data data{};
83 jsonifier::string_view protocol{
"udp" };
86 struct voice_identify_data {
87 jsonifier::string sessionId{};
88 jsonifier::string serverId{};
89 jsonifier::string token{};
93 enum class send_speaking_type : uint8_t {
98 Priority_And_Voice = Microphone | Priority,
101 struct send_speaking_data {
102 send_speaking_type type{};
107 enum class https_workload_class : uint8_t { Get = 0, Put = 1, Post = 2, Patch = 3, Delete = 4 };
109 enum class payload_type : uint8_t { Application_Json = 1, Multipart_Form = 2 };
111 enum class https_workload_type : uint8_t {
113 Get_Global_Application_Commands = 1,
114 Post_Global_Application_Command = 2,
115 Get_Global_Application_Command = 3,
116 Patch_Global_Application_Command = 4,
117 Delete_Global_Application_Command = 5,
118 Bulk_Put_Global_Application_Commands = 6,
119 Get_Guild_Application_Commands = 7,
120 Post_Guild_Application_Command = 8,
121 Get_Guild_Application_Command = 9,
122 Patch_Guild_Application_Command = 10,
123 Delete_Guild_Application_Command = 11,
124 Bulk_Put_Guild_Application_Commands = 12,
125 Get_Guild_Application_Commands_Permissions = 13,
126 Get_Guild_Application_Command_Permissions = 14,
127 Put_Guild_Application_Command_Permissions = 15,
128 Batch_Put_Guild_Application_Command_Permissions = 16,
129 Post_Interaction_Response = 17,
130 Get_Interaction_Response = 18,
131 Patch_Interaction_Response = 19,
132 Delete_Interaction_Response = 20,
133 Post_Followup_Message = 21,
134 Get_Followup_Message = 22,
135 Patch_Followup_Message = 23,
136 Delete_Followup_Message = 24,
137 Get_Guild_Audit_Logs = 25,
144 Crosspost_Message = 32,
146 Delete_Own_Reaction = 34,
147 Delete_User_Reaction = 35,
149 Delete_All_Reactions = 37,
150 Delete_Reactions_By_Emoji = 38,
153 Delete_Message_Old = 41,
154 Bulk_Delete_Messages = 42,
155 Put_Channel_Permission_Overwrites = 43,
156 Get_Channel_Invites = 44,
157 Post_Channel_Invite = 45,
158 Delete_Channel_Permission_Overwrites = 46,
159 Post_Follow_News_Channel = 47,
160 Post_Trigger_Typing_Indicator = 48,
161 Get_Pinned_Messages = 49,
162 Put_Pin_Message = 50,
163 Delete_Pin_Message = 51,
164 Put_Recipient_To_Group_Dm = 52,
165 Delete_Recipient_From_Group_Dm = 53,
166 Post_Thread_With_Message = 54,
167 Post_Thread_Without_Message = 55,
168 Put_Self_In_Thread = 56,
169 Put_Thread_Member = 57,
170 Delete_Self_From_Thread = 58,
171 Delete_Thread_Member = 59,
172 Get_Thread_Member = 60,
173 Get_Thread_Members = 61,
174 Get_Active_Threads = 62,
175 Get_Public_Archived_Threads = 63,
176 Get_Private_Archived_Threads = 64,
177 Get_Joined_Private_Archived_Threads = 65,
179 Get_Guild_Emoji = 67,
180 Post_Guild_Emoji = 68,
181 Patch_Guild_Emoji = 69,
182 Delete_Guild_Emoji = 70,
185 Get_Guild_Preview = 73,
188 Get_Guild_Channels = 76,
189 Post_Guild_Channel = 77,
190 Patch_Guild_Channel_Positions = 78,
191 Get_Guild_Active_Threads = 79,
192 Get_Guild_Member = 80,
193 Get_Guild_Members = 81,
194 Get_Search_Guild_Members = 82,
195 Put_Guild_Member = 83,
196 Patch_Guild_Member = 84,
197 Patch_Current_Guild_Member = 85,
198 Put_Guild_Member_Role = 86,
199 Delete_Guild_Member_Role = 87,
200 Delete_Guild_Member = 88,
204 Delete_Guild_Ban = 92,
205 Get_Guild_Roles = 93,
206 Post_Guild_Role = 94,
207 Patch_Guild_Role_Positions = 95,
208 Patch_Guild_Role = 96,
209 Delete_Guild_Role = 97,
210 Get_Guild_Prune_Count = 98,
211 Post_Guild_Prune = 99,
212 Get_Guild_Voice_Regions = 100,
213 Get_Guild_Invites = 101,
214 Get_Guild_Integrations = 102,
215 Delete_Guild_Integration = 103,
216 Get_Guild_Widget_Settings = 104,
217 Patch_Guild_Widget = 105,
218 Get_Guild_Widget = 106,
219 Get_Vanity_Invite = 107,
220 Get_Guild_Widget_Image = 108,
221 Get_Guild_Welcome_Screen = 109,
222 Patch_Guild_Welcome_Screen = 110,
223 Patch_Current_User_Voice_State = 111,
224 Patch_User_Voice_State = 112,
225 Get_Guild_Scheduled_Events = 113,
226 Post_Guild_Scheduled_Event = 114,
227 Get_Guild_Scheduled_Event = 115,
228 Patch_Guild_Scheduled_Event = 116,
229 Delete_Guild_Scheduled_Event = 117,
230 Get_Guild_Scheduled_Event_Users = 118,
231 Get_Guild_Template = 119,
232 Post_Guild_From_Guild_Template = 120,
233 Get_Guild_Templates = 121,
234 Post_Guild_Template = 122,
235 Put_Guild_Template = 123,
236 Patch_Guild_Template = 124,
237 Delete_Guild_Template = 125,
240 Post_Stage_Instance = 128,
241 Get_Stage_Instance = 129,
242 Patch_Stage_Instance = 130,
243 Delete_Stage_Instance = 131,
245 Get_Nitro_Sticker_Packs = 133,
246 Get_Guild_Stickers = 134,
247 Post_Guild_Sticker = 135,
248 Patch_Guild_Sticker = 136,
249 Delete_Guild_Sticker = 137,
250 Get_Current_User = 138,
252 Patch_Current_User = 140,
253 Get_Current_User_Guilds = 141,
254 Delete_Leave_Guild = 142,
255 Post_Create_User_Dm = 143,
256 Get_User_Connections = 144,
257 Get_Voice_Regions = 145,
259 Get_Channel_Webhooks = 147,
260 Get_Guild_Webhooks = 148,
262 Get_Webhook_With_Token = 150,
264 Patch_Webhook_With_Token = 152,
265 Delete_Webhook = 153,
266 Delete_Webhook_With_Token = 154,
267 Post_Execute_Webhook = 155,
268 Get_Webhook_Message = 156,
269 Patch_Webhook_Message = 157,
270 Delete_Webhook_Message = 158,
271 Get_Application_Info = 159,
272 Get_Authorization_Info = 160,
273 Get_Gateway_Bot = 161,
274 Post_Thread_In_Forum_Channel = 162,
275 Get_Auto_Moderation_Rules = 163,
276 Get_Auto_Moderation_Rule = 164,
277 Post_Auto_Moderation_Rule = 165,
278 Patch_Auto_Moderation_Rule = 166,
279 Delete_Auto_Moderation_Rule = 167,
280 YouTube_Get_Search_Results = 168,
281 SoundCloud_Get_Search_Results = 169,
282 SoundCloud_Get_Client_Id = 170,
283 SoundCloud_Get_Download_Links = 171,
287 class DiscordCoreAPI_Dll https_workload_data {
289 friend class https_client;
291 unordered_map<jsonifier::string, jsonifier::string> headersToInsert{};
292 payload_type payloadType{ payload_type::Application_Json };
293 https_workload_class workloadClass{};
294 jsonifier::string relativePath{};
295 jsonifier::string callStack{};
296 jsonifier::string baseUrl{};
297 jsonifier::string content{};
299 https_workload_data() =
default;
301 https_workload_data& operator=(https_workload_data&& other)
noexcept;
302 https_workload_data(https_workload_data&& other)
noexcept;
304 https_workload_data& operator=(
const https_workload_data& other) =
delete;
305 https_workload_data(
const https_workload_data& other) =
delete;
307 https_workload_data& operator=(https_workload_type type);
309 https_workload_data(https_workload_type type);
311 https_workload_type getWorkloadType()
const;
314 https_workload_type workloadType{};
317 struct DiscordCoreAPI_Dll hello_data {
318 hello_data() =
default;
319 jsonifier::vector<jsonifier::string> _trace{};
320 uint64_t heartbeatInterval{};
323 struct websocket_message {
324 jsonifier::string t{};
329 template<
typename value_type>
struct websocket_message_data {
330 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
331 jsonifier::string t{};
336 DCA_INLINE
operator discord_core_internal::etf_serializer() {
337 etf_serializer data{};
341 data[
"d"] = d.operator discord_core_internal::etf_serializer();
347 template<
typename value_type,
typename value_type02>
struct updated_event_data;
348 template<
typename value_type>
struct event_data;
355 struct connection_package {
356 uint64_t currentReconnectTries{};
357 uint32_t currentShard{};
358 bool areWeResuming{};
408 template<
typename value_type>
class flag_entity {
410 template<jsonifier::concepts::enum_t value_type02> DCA_INLINE
auto setFlagValue(value_type02 theFlagToSet,
bool enabled) {
411 auto newValue =
static_cast<int64_t
>(
static_cast<value_type*
>(
this)->flags);
413 newValue |=
static_cast<int64_t
>(theFlagToSet);
415 newValue &= ~static_cast<int64_t>(theFlagToSet);
417 static_cast<value_type*
>(
this)->flags =
static_cast<value_type02
>(newValue);
420 template<jsonifier::concepts::enum_t value_type02> DCA_INLINE
bool getFlagValue(value_type02 theFlagToCheckFor)
const {
421 return static_cast<int64_t
>(
static_cast<const value_type*
>(
this)->flags) &
static_cast<int64_t
>(theFlagToCheckFor);
425 DCA_INLINE flag_entity() =
default;
426 DCA_INLINE ~flag_entity() =
default;
429 enum class user_image_types {
433 Avatar_Decoration = 3,
436 template<
typename value_type>
class get_user_image_url {
438 template<user_image_types type> DCA_INLINE jsonifier::string getUserImageUrl()
const {
439 jsonifier::string baseUrl{
"https://cdn.discordapp.com/" };
441 case user_image_types::Banner: {
442 baseUrl +=
"banners/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
443 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->banner) +
".png";
446 case user_image_types::Default_Avatar: {
448 if (
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->discriminator) ==
"0") {
449 index = (jsonifier::strToUint64(
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->
id).data()) >> 22) % 6;
451 index = jsonifier::strToUint64(
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->discriminator).data()) % 5;
453 baseUrl +=
"embed/avatars/" + jsonifier::toString(index) +
".png";
456 case user_image_types::Avatar: {
457 baseUrl +=
"avatars/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
458 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->avatar) +
".png";
461 case user_image_types::Avatar_Decoration: {
462 baseUrl +=
"avatar-decorations/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
463 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->avatarDecoration) +
".png";
473 DCA_INLINE get_user_image_url() =
default;
474 DCA_INLINE ~get_user_image_url() =
default;
477 enum class guild_member_image_types {
482 template<
typename value_type>
class get_guild_member_image_url {
484 template<guild_member_image_types type> jsonifier::string getGuildMemberImageUrl()
const {
485 jsonifier::string baseUrl{
"https://cdn.discordapp.com/" };
487 case guild_member_image_types::Avatar: {
488 baseUrl +=
"guilds/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->guildId) +
"/users/" +
489 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->user.id) +
"/avatars/" +
490 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->avatar) +
".png";
493 case guild_member_image_types::Banner: {
503 DCA_INLINE get_guild_member_image_url() =
default;
504 DCA_INLINE ~get_guild_member_image_url() =
default;
507 enum class guild_image_types {
510 Discovery_Splash = 2,
514 template<
typename value_type>
class get_guild_image_url {
516 template<guild_image_types type> jsonifier::string getGuildImageUrl()
const {
517 jsonifier::string baseUrl{
"https://cdn.discordapp.com/" };
519 case guild_image_types::Icon: {
520 baseUrl +=
"icons/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
521 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->icon) +
".png";
524 case guild_image_types::Splash: {
525 baseUrl +=
"splashes/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
526 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->splash) +
".png";
529 case guild_image_types::Discovery_Splash: {
530 baseUrl +=
"icons/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
531 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->discoverySplash) +
".png";
534 case guild_image_types::Banner: {
535 baseUrl +=
"banners/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->id) +
"/" +
536 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->banner) +
".png";
546 DCA_INLINE get_guild_image_url() =
default;
547 DCA_INLINE ~get_guild_image_url() =
default;
587 void generateExcludedKeys();
620 void generateExcludedKeys();
643 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
644 jsonifier::vector<embed_field_data> fields{};
645 embed_thumbnail_data thumbnail{};
646 jsonifier::string description{};
647 embed_provider_data provider{};
648 embed_footer_data footer{};
649 embed_author_data author{};
650 jsonifier::string title{};
651 uint64_t hexColorValue{};
652 jsonifier::string type{};
653 embed_image_data image{};
654 embed_video_data video{};
655 jsonifier::string url{};
656 time_stamp timeStamp{};
658 void generateExcludedKeys();
664 embed_data& setAuthor(
const jsonifier::string& authorName,
const jsonifier::string& authorAvatarUrl =
"");
670 embed_data& setFooter(
const jsonifier::string& footerText,
const jsonifier::string& footerIconUrlText =
"");
675 embed_data& setTimeStamp(
const jsonifier::string& timeStamp);
682 embed_data& addField(
const jsonifier::string& name,
const jsonifier::string& value,
bool Inline =
true);
687 embed_data& setDescription(
const jsonifier::string& descriptionNew);
692 embed_data& setColor(
const jsonifier::string& hexColorValueNew);
697 embed_data& setThumbnail(
const jsonifier::string& thumbnailUrl);
702 embed_data& setTitle(
const jsonifier::string& titleNew);
707 embed_data& setImage(
const jsonifier::string& imageUrl);
718 enum class media_type : uint8_t {
png = 0, gif = 1, jpeg = 2, mpeg = 3, mp3 = 4 };
765 DCA_INLINE thread_member_data() =
default;
781 virtual DCA_INLINE ~voice_state_data_light() =
default;
784 struct voice_server_update_data {
785 jsonifier::string endpoint{};
787 jsonifier::string token{};
811 enum class role_flags : uint8_t { mentionable = 1 << 0, managed = 1 << 1, hoist = 1 << 2 };
814 class DiscordCoreAPI_Dll
user_data :
public get_user_image_url<user_data>,
public flag_entity<user_data> {
816 template<
typename value_type>
friend struct jsonifier::core;
817 friend class get_user_image_url<
user_data>;
819 jsonifier::string avatarDecoration{};
820 jsonifier::string discriminator{};
821 jsonifier::string globalName{};
822 jsonifier::string userName{};
823 jsonifier::string locale{};
824 jsonifier::string banner{};
825 jsonifier::string avatar{};
826 jsonifier::string email{};
827 uint64_t accentColor{};
828 int32_t premiumType{};
829 int32_t publicFlags{};
843 class DiscordCoreAPI_Dll
user_cache_data :
public get_user_image_url<user_cache_data>,
public flag_entity<user_cache_data> {
845 template<
typename value_type>
friend struct jsonifier::core;
846 friend class get_user_image_url<user_cache_data>;
848 jsonifier::string avatarDecoration{};
849 jsonifier::string discriminator{};
850 jsonifier::string globalName{};
851 jsonifier::string userName{};
852 jsonifier::string avatar{};
853 jsonifier::string banner{};
855 uint64_t accentColor{};
859 DCA_INLINE user_cache_data() =
default;
861 user_cache_data& operator=(user_data&& other)
noexcept;
862 user_cache_data(user_data&& other)
noexcept;
864 user_cache_data& operator=(
const user_data& other);
865 user_cache_data(
const user_data& other);
870 DCA_INLINE
bool operator==(
const snowflake& other)
const {
876 class DiscordCoreAPI_Dll
role_data :
public flag_entity<role_data> {
878 jsonifier::string unicodeEmoji{};
879 permissions_parse permissions{};
880 jsonifier::string name{};
881 jsonifier::string icon{};
882 role_tags_data tags{};
899 friend class guild_data;
901 jsonifier::string unicodeEmoji{};
902 permissions permissionsVal{};
903 jsonifier::string name{};
910 DCA_INLINE role_cache_data() =
default;
912 role_cache_data& operator=(role_data&& other)
noexcept;
913 role_cache_data(role_data&& other)
noexcept;
915 role_cache_data& operator=(
const role_data&);
916 role_cache_data(
const role_data&);
920 DCA_INLINE
bool operator==(
const snowflake& other)
const {
928 friend class emoji_data;
929 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
930 jsonifier::string name{};
934 DCA_INLINE partial_emoji_data() =
default;
936 void generateExcludedKeys();
942 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
943 jsonifier::vector<role_data> roles{};
944 std::wstring unicodeName{ L
"" };
945 bool available{
true };
946 bool requireColons{};
950 void generateExcludedKeys();
953 enum class presence_update_flags : uint8_t {
954 Desktop_Online = 0b00000001,
955 Desktop_Idle = 0b00000010,
956 Desktop_Dnd = 0b000000011,
957 Mobile_Online = 0b00000010,
958 Mobile_Idle = 0b00000100,
959 Mobile_Dnd = 0b00000110,
960 Web_Online = 0b00000100,
961 Web_Idle = 0b00001000,
962 Web_Dnd = 0b00001100,
963 Status_Online = 0b00001000,
964 Status_Idle = 0b00010000,
965 Status_Dnd = 0b00011000
968 struct client_status {
969 jsonifier::string desktop{};
970 jsonifier::string mobile{};
971 jsonifier::string web{};
983 enum class guild_member_flags : uint8_t { Pending = 1 << 0, Deaf = 1 << 1, Mute = 1 << 2 };
989 DCA_INLINE user_id_base() =
default;
996 class DiscordCoreAPI_Dll
guild_member_data :
public flag_entity<guild_member_data>,
public get_guild_member_image_url<guild_member_data> {
998 template<
typename value_type>
friend class get_guild_member_image_url;
999 template<
typename value_type>
friend struct jsonifier::core;
1000 template<
typename value_type>
friend struct event_data;
1001 friend class guild_data;
1003 time_stamp communicationDisabledUntil{};
1004 jsonifier::vector<snowflake> roles{};
1005 jsonifier::string premiumSince{};
1006 permissions_parse permissions{};
1007 jsonifier::string avatar{};
1008 guild_member_flags flags{};
1009 jsonifier::string nick{};
1010 time_stamp joinedAt{};
1011 snowflake guildId{};
1017 DCA_INLINE guild_member_data() =
default;
1019 voice_state_data_light getVoiceStateData();
1021 user_cache_data getUserData();
1025 class DiscordCoreAPI_Dll
guild_member_cache_data :
public flag_entity<guild_member_cache_data>,
public get_guild_member_image_url<guild_member_cache_data> {
1027 template<
typename value_type>
friend struct jsonifier::core;
1028 template<
typename value_type>
friend struct std::hash;
1029 template<
typename value_type>
friend struct event_data;
1030 friend class guild_data;
1032 jsonifier::vector<snowflake> roles{};
1033 permissions permissionsVal{};
1034 guild_member_flags flags{};
1035 jsonifier::string nick{};
1036 time_stamp joinedAt{};
1037 user_id_base user{};
1038 snowflake guildId{};
1041 guild_member_cache_data() =
default;
1043 guild_member_cache_data& operator=(guild_member_data&& other)
noexcept;
1044 guild_member_cache_data(guild_member_data&& other)
noexcept;
1046 guild_member_cache_data& operator=(
const guild_member_data&);
1047 guild_member_cache_data(
const guild_member_data&);
1049 operator guild_member_data();
1051 voice_state_data_light getVoiceStateData();
1053 user_cache_data getUserData();
1055 DCA_INLINE guild_member_cache_data(uint64_t snowFlake) {
1056 user.id = snowFlake;
1075 enum class channel_flags : uint8_t { nsfw = 1 << 0, managed = 1 << 1 };
1077 struct default_reaction_data {
1078 jsonifier::string emojiName{};
1079 snowflake emojiId{};
1101 jsonifier::vector<over_write_data> permissionOverwrites{};
1102 jsonifier::vector<forum_tag_data> availableTags{};
1103 default_reaction_data defaultReactionEmoji{};
1104 jsonifier::vector<snowflake> appliedTags{};
1105 jsonifier::vector<user_data> recipients{};
1106 uint32_t defaultThreadRateLimitPerUser{};
1108 uint32_t defaultAutoArchiveDuration{};
1109 thread_metadata_data threadMetadata{};
1110 jsonifier::string lastPinTimestamp{};
1112 permissions_parse permissions{};
1113 jsonifier::string rtcRegion{};
1114 uint32_t totalMessageSent{};
1115 uint32_t rateLimitPerUser{};
1116 uint32_t videoQualityMode{};
1117 thread_member_data member{};
1118 jsonifier::string topic{};
1119 snowflake lastMessageId{};
1120 snowflake applicationId{};
1121 jsonifier::string name{};
1122 jsonifier::string icon{};
1123 uint32_t messageCount{};
1124 uint32_t memberCount{};
1125 channel_flags flags{};
1126 snowflake parentId{};
1127 uint32_t userLimit{};
1128 snowflake ownerId{};
1129 snowflake guildId{};
1130 uint32_t position{};
1137 DCA_INLINE channel_data() =
default;
1139 channel_data(snowflake);
1141 jsonifier::string getIconUrl();
1147 friend class guild_data;
1149 jsonifier::vector<over_write_data> permissionOverwrites{};
1151 jsonifier::string topic{};
1152 jsonifier::string name{};
1153 uint32_t memberCount{};
1154 snowflake parentId{};
1155 channel_flags flags{};
1156 uint32_t position{};
1157 snowflake ownerId{};
1158 snowflake guildId{};
1161 DCA_INLINE channel_cache_data() =
default;
1163 channel_cache_data& operator=(channel_data&& other)
noexcept;
1164 channel_cache_data(channel_data&& other)
noexcept;
1166 channel_cache_data& operator=(
const channel_data& snowFlake);
1167 channel_cache_data(
const channel_data& snowFlake);
1170 operator channel_data();
1172 DCA_INLINE
bool operator==(
const snowflake& other)
const {
1179 jsonifier::vector<thread_member_data> members{};
1180 jsonifier::vector<channel_data> threads{};
1186 jsonifier::vector<thread_member_data> members{};
1187 jsonifier::vector<channel_data> threads{};
1277 DCA_INLINE auto_moderation_rule_data() =
default;
1296 DCA_INLINE guild_application_command_permissions_data() =
default;
1301 jsonifier::vector<over_write_data> permissionOverwrites{};
1302 uint64_t defaultAutoArchiveDuration{ 10080 };
1303 uint64_t videoQualityMode{ 1 };
1304 jsonifier::string parentId{};
1305 jsonifier::string rtcRgion{};
1306 uint64_t rateLimitPerUser{};
1307 uint64_t bitrate{ 48000 };
1308 jsonifier::string topic{};
1309 jsonifier::string name{};
1310 uint64_t userLimit{};
1311 uint64_t position{};
1329 DCA_INLINE reaction_data() =
default;
1377 operator discord_core_internal::etf_serializer();
1387 operator discord_core_internal::etf_serializer();
1393 jsonifier::vector<team_members_object_data>
members{};
1398 DCA_INLINE team_object_data() =
default;
1415 jsonifier::vector<jsonifier::string>
scopes{};
1423 jsonifier::vector<jsonifier::string>
tags{};
1426 jsonifier::string customInstallUrl{};
1444 DCA_INLINE application_data() =
default;
1449 jsonifier::vector<jsonifier::string>
scopes{};
1461 DCA_INLINE account_data() =
default;
1491 jsonifier::string url{};
1513 DCA_INLINE integration_data() =
default;
1585 DCA_INLINE optional_audit_entry_info_data() =
default;
1603 jsonifier::vector<audit_log_change_data>
changes{};
1680 DCA_INLINE stage_instance_data() =
default;
1689 enum class sticker_flags : uint8_t { Available = 1 << 0 };
1708 DCA_INLINE sticker_data() =
default;
1713 jsonifier::vector<jsonifier::string> features{};
1714 jsonifier::vector<sticker_data> stickers{};
1715 jsonifier::vector<emoji_data> emojis{};
1716 jsonifier::string discoverySplash{};
1717 uint64_t approximatePresenceCount{};
1718 uint64_t approximateMemberCount{};
1719 jsonifier::string description{};
1720 jsonifier::string splash{};
1721 jsonifier::string name{};
1722 jsonifier::string icon{};
1778 jsonifier::string location{};
1800 DCA_INLINE guild_scheduled_event_data() =
default;
1825 snowflake channelId{};
1826 snowflake messageId{};
1827 snowflake guildId{};
1834 jsonifier::string interactionToken{};
1835 snowflake applicationId{};
1836 snowflake interactionId{};
1841 snowflake channelId{};
1842 snowflake messageId{};
1849 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
1853 void generateExcludedKeys();
1855 bool operator==(
const application_command_option_choice_data&)
const;
1862 jsonifier::vector<application_command_option_choice_data>
choices{};
1863 jsonifier::vector<application_command_option_data>
options{};
1864 int64_t
minValue{ std::numeric_limits<int64_t>::max() };
1865 int64_t
maxValue{ std::numeric_limits<int64_t>::min() };
1866 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
1874 void generateExcludedKeys();
1876 bool operator==(
const application_command_option_data&)
const;
1881 guild_member_data member{};
1882 time_stamp timeStamp{};
1883 snowflake channelId{};
1884 snowflake guildId{};
1888 struct you_tube_format {
1889 jsonifier::string signatureCipher{};
1890 jsonifier::string audioSampleRate{};
1891 jsonifier::string audioQuality{};
1892 jsonifier::string downloadUrl{};
1893 jsonifier::string signature{};
1894 jsonifier::string mimeType{};
1895 jsonifier::string quality{};
1896 jsonifier::string codecs{};
1897 jsonifier::string aitags{};
1898 uint64_t averageBitrate{};
1899 int64_t contentLength{};
1928 enum class select_default_value_type { user = 0, role = 1, channel = 2 };
1930 class select_default_value_data {
1932 DCA_INLINE select_default_value_data() =
default;
1934 DCA_INLINE select_default_value_data(select_default_value_type typeNew) {
1936 case select_default_value_type::user: {
1940 case select_default_value_type::role: {
1944 case select_default_value_type::channel: {
1950 jsonifier::string type{};
1957 jsonifier::vector<jsonifier::string>
parse{};
1958 jsonifier::vector<jsonifier::string>
roles{};
1959 jsonifier::vector<jsonifier::string>
users{};
1991 struct DiscordCoreAPI_Dll component_data {
1992 jsonifier::vector<select_default_value_data> defaultValues{};
1993 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
1994 jsonifier::vector<select_option_data> options{};
1995 jsonifier::vector<channel_type> channelTypes{};
1996 jsonifier::string placeholder{};
1997 jsonifier::string customId{};
1998 partial_emoji_data emoji{};
1999 jsonifier::string label{};
2000 jsonifier::string value{};
2001 jsonifier::string title{};
2002 jsonifier::string url{};
2004 uint64_t minValues{};
2005 uint64_t maxValues{};
2006 uint64_t minLength{};
2007 uint64_t maxLength{};
2012 void generateExcludedKeys();
2020 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
2022 void generateExcludedKeys();
2038 jsonifier::vector<application_command_option_choice_data> choices{};
2039 jsonifier::vector<attachment_data> attachments{};
2040 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
2041 jsonifier::vector<action_row_data> components{};
2042 allowed_mentions_data allowedMentions{};
2043 jsonifier::vector<embed_data> embeds{};
2044 jsonifier::vector<file> files{};
2045 jsonifier::string customId{};
2046 jsonifier::string content{};
2047 jsonifier::string title{};
2051 void generateExcludedKeys();
2061 jsonifier::vector<application_command_option_data>
options{};
2073 DCA_INLINE application_command_data() =
default;
2075 void generateExcludedKeys();
2077 bool operator==(
const application_command_data&)
const;
2113 DCA_INLINE thread_members_update_data() =
default;
2119 guild_member_data member{};
2120 jsonifier::string name{};
2125 DCA_INLINE message_interaction_data() =
default;
2202 jsonifier::vector<reaction_data> reactions{};
2228 virtual DCA_INLINE ~message_data() =
default;
2234 unordered_map<snowflake, guild_member_data>
members{};
2237 unordered_map<snowflake, user_data>
users{};
2238 unordered_map<snowflake, role_data>
roles{};
2275 jsonifier::vector<application_command_interaction_data_option>
options{};
2284 jsonifier::vector<application_command_interaction_data_option>
options{};
2286 jsonifier::vector<jsonifier::string>
values{};
2320 jsonifier::vector<emoji_data> emojis{};
2321 snowflake guildId{};
2326 jsonifier::vector<sticker_data> stickers{};
2327 snowflake guildId{};
2330 struct guild_members_chunk_event_data {
2331 jsonifier::vector<presence_update_data> presences{};
2332 jsonifier::vector<jsonifier::string> notFound{};
2333 jsonifier::vector<guild_member_data> members{};
2334 jsonifier::string nonce{};
2335 uint64_t chunkIndex{};
2336 uint64_t chunkCount{};
2337 snowflake guildId{};
2343 template<
typename value_type>
friend class get_user_image_url;
2344 friend class discord_core_client;
2346 bot_user(
user_data& dataPackage, discord_core_internal::base_socket_agent* pBaseBaseSocketAgentNew);
2350 void updateVoiceStatus(update_voice_state_data dataPackage);
2354 void updatePresence(update_presence_data dataPackage);
2357 bot_user() =
default;
2359 discord_core_internal::base_socket_agent* baseSocketAgent{};
2371 template<guild_member_t value_type> two_id_key::two_id_key(
const value_type& other) {
2372 idOne = other.guildId;
2373 idTwo = other.user.id;
2376 template<voice_state_t value_type> two_id_key::two_id_key(
const value_type& other) {
2377 idOne = other.guildId;
2378 idTwo = other.userId;
2382 template<
typename value_type,
typename discord_core_client_t,
typename guild_members_type>
struct connect_to_voice {
2390 DCA_INLINE voice_connection&
connectToVoice(
const snowflake guildMemberId,
const snowflake channelId = 0,
bool selfDeaf =
false,
bool selfMute =
false,
2391 stream_info streamInfoNew = stream_info{}) {
2392 if (
static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())
2393 ->getVoiceConnection(
static_cast<value_type*
>(
this)->
id)
2394 .areWeConnected()) {
2395 return static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->
id);
2396 }
else if (guildMemberId != 0 || channelId != 0) {
2397 snowflake channelIdNew{};
2398 if (guildMemberId != 0) {
2399 voice_state_data_light dataLight{};
2400 dataLight.guildId =
static_cast<value_type*
>(
this)->
id;
2401 dataLight.userId = guildMemberId;
2402 guild_member_data getData{};
2403 getData.guildId =
static_cast<value_type*
>(
this)->
id;
2404 getData.user.
id = guildMemberId;
2405 auto voiceStateData = guild_members_type::getVoiceStateData(getData);
2406 if (voiceStateData.channelId != 0) {
2407 channelIdNew = voiceStateData.channelId;
2410 channelIdNew = channelId;
2412 int32_t theShardId{
static_cast<int32_t
>((
static_cast<value_type*
>(
this)->id.operator
const uint64_t&() >> 22) %
2413 static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getConfigManager().getTotalShardCount()) };
2414 voice_connect_init_data voiceConnectInitData{};
2415 voiceConnectInitData.currentShard = theShardId;
2416 voiceConnectInitData.streamInfo = streamInfoNew;
2417 voiceConnectInitData.channelId = channelIdNew;
2418 voiceConnectInitData.guildId =
static_cast<value_type*
>(
this)->
id;
2419 voiceConnectInitData.userId =
static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getBotUser().id;
2420 voiceConnectInitData.selfDeaf = selfDeaf;
2421 voiceConnectInitData.selfMute = selfMute;
2422 auto& voiceConnectionNew =
2423 static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->
id);
2424 stop_watch<milliseconds> stopWatch{ milliseconds{ 10000 } };
2426 voiceConnectionNew.connect(voiceConnectInitData);
2427 while (!voiceConnectionNew.areWeConnected()) {
2428 if (stopWatch.hasTimeElapsed()) {
2431 std::this_thread::sleep_for(1ms);
2433 return voiceConnectionNew;
2435 return static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->
id);
2440 class DiscordCoreAPI_Dll
guild_data :
public flag_entity<guild_data>,
2441 public get_guild_image_url<guild_data>,
2446 jsonifier::vector<guild_scheduled_event_data> guildScheduledEvents{};
2448 jsonifier::vector<stage_instance_data> stageInstances{};
2449 jsonifier::vector<voice_state_data_light> voiceStates{};
2451 jsonifier::vector<presence_update_data> presences{};
2452 jsonifier::vector<jsonifier::string> features{};
2453 jsonifier::vector<guild_member_data> members{};
2454 jsonifier::vector<channel_data> channels{};
2455 jsonifier::vector<sticker_data> stickers{};
2456 jsonifier::vector<channel_data> threads{};
2459 jsonifier::vector<emoji_data> emoji{};
2460 uint32_t maxStageVideoChannelUsers{};
2461 jsonifier::vector<role_data> roles{};
2462 uint32_t premiumSubscriptionCount{};
2463 jsonifier::string preferredLocale{};
2464 jsonifier::string discoverySplash{};
2465 uint32_t approximatePresenceCount{};
2466 voice_connection* voiceConnection{};
2467 welcome_screen_data welcomeScreen{};
2468 snowflake publicUpdatesChannelId{};
2469 snowflake safetyAlertsChannelId{};
2470 uint32_t approximateMemberCount{};
2471 jsonifier::string vanityUrlCode{};
2472 bool premiumProgressBarEnabled{};
2473 uint32_t maxVideoChannelUsers{};
2474 jsonifier::string description{};
2475 permissions_parse permissions{};
2476 jsonifier::string discovery{};
2477 snowflake systemChannelId{};
2478 snowflake widgetChannelId{};
2480 jsonifier::string splash{};
2481 jsonifier::string banner{};
2483 snowflake rulesChannelId{};
2484 snowflake applicationId{};
2485 snowflake afkChannelId{};
2486 jsonifier::string name{};
2487 jsonifier::string icon{};
2488 uint32_t maxPresences{};
2489 uint32_t memberCount{};
2490 uint32_t maxMembers{};
2491 uint32_t afkTimeout{};
2492 time_stamp joinedAt{};
2493 bool widgetEnabled{};
2495 snowflake ownerId{};
2502 DCA_INLINE guild_data() =
default;
2504 guild_data(snowflake snowflake);
2506 discord_core_client* getDiscordCoreClient();
2508 bool areWeConnected();
2521 public get_guild_image_url<guild_cache_data>,
2522 public connect_to_voice<guild_cache_data, discord_core_client, guild_members> {
2524 jsonifier::vector<snowflake> channels{};
2525 jsonifier::vector<snowflake> members{};
2526 jsonifier::vector<snowflake> emoji{};
2527 jsonifier::vector<snowflake> roles{};
2528 voice_connection* voiceConnection{};
2529 icon_hash discoverySplash{};
2530 jsonifier::string name{};
2531 uint32_t memberCount{};
2532 time_stamp joinedAt{};
2533 icon_hash discovery{};
2534 snowflake ownerId{};
2541 DCA_INLINE guild_cache_data() =
default;
2543 guild_cache_data(snowflake snowflakeNew);
2545 guild_cache_data& operator=(guild_data&& data)
noexcept;
2546 guild_cache_data(guild_data&& data)
noexcept;
2548 guild_cache_data& operator=(
const guild_data&);
2550 guild_cache_data(
const guild_data&);
2552 operator guild_data();
2554 discord_core_client* getDiscordCoreClient();
2556 DCA_INLINE
bool operator==(
const snowflake& other)
const {
2560 bool areWeConnected();
2569 jsonifier::string appPermissions{};
2570 jsonifier::string guildLocale{};
2571 interaction_data_data data{};
2572 jsonifier::string locale{};
2573 guild_member_data member{};
2574 snowflake applicationId{};
2575 jsonifier::string token{};
2577 message_data message{};
2578 channel_data channel{};
2579 snowflake channelId{};
2580 snowflake guildId{};
2586 DCA_INLINE interaction_data() =
default;
2589 class partial_guild_data {
2648 DCA_INLINE web_hook_data() =
default;
2654 jsonifier::vector<guild_scheduled_event_data> guildScheduledEvents{};
2655 jsonifier::vector<auto_moderation_rule_data> autoModerationRules{};
2656 jsonifier::vector<audit_log_entry_data> auditLogEntries{};
2657 jsonifier::vector<integration_data> integrations{};
2658 jsonifier::vector<web_hook_data> webhooks{};
2659 jsonifier::vector<channel_data> threads{};
2660 jsonifier::vector<user_data> users{};
2662 auto getAuditLogData(
const snowflake userIdOfChanger, audit_log_event auditLogType);
2664 auto getAuditLogData(audit_log_event auditLogType,
const snowflake userIdOfTarget);
2670 template<
typename value_type>
friend struct jsonifier::core;
2671 template<
typename value_type>
friend struct event_data;
2672 friend struct on_interaction_creation_data;
2673 friend struct base_function_arguments;
2675 friend class discord_core_internal::websocket_client;
2676 friend class discord_core_internal::base_socket_agent;
2677 friend class respond_to_input_event_data;
2678 friend class discord_core_client;
2679 friend class command_data;
2680 friend class input_events;
2684 input_event_data& operator=(input_event_data&& other)
noexcept;
2686 input_event_data(input_event_data&& other)
noexcept;
2688 input_event_data& operator=(
const input_event_data& other);
2690 input_event_data(
const input_event_data& other);
2692 input_event_data& operator=(
const interaction_data& other);
2694 input_event_data(
const interaction_data& interactionData);
2696 DCA_INLINE input_event_data() =
default;
2700 const interaction_data& getInteractionData()
const;
2704 const guild_member_data& getGuildMemberData()
const;
2708 const channel_data& getChannelData()
const;
2712 const message_data& getMessageData()
const;
2719 unique_ptr<interaction_data> interactionData{ makeUnique<interaction_data>() };
2722 struct DiscordCoreAPI_Dll move_through_message_pages_data;
2727 friend struct delete_interaction_response_data;
2728 friend struct delete_follow_up_message_data;
2729 friend struct interaction_response_data;
2731 friend DiscordCoreAPI_Dll move_through_message_pages_data moveThroughMessagePages(
const jsonifier::string& userID, input_event_data originalEvent,
2732 uint32_t currentPageIndex,
const jsonifier::vector<embed_data>& messageEmbeds,
bool deleteAfter, uint32_t waitForMaxMs,
bool returnResult);
2734 friend class create_ephemeral_interaction_response_data;
2735 friend class create_deferred_interaction_response_data;
2736 friend class create_ephemeral_follow_up_message_data;
2737 friend class create_interaction_response_data;
2738 friend class edit_interaction_response_data;
2739 friend class create_follow_up_message_data;
2740 friend class edit_follow_up_message_data;
2741 friend class create_message_data;
2742 friend class edit_message_data;
2743 friend class input_events;
2744 friend class send_dmdata;
2746 operator interaction_callback_data()
const;
2748 DCA_INLINE respond_to_input_event_data()
noexcept =
default;
2750 respond_to_input_event_data& operator=(
const interaction_data dataPackage);
2752 respond_to_input_event_data(
const interaction_data dataPackage);
2754 respond_to_input_event_data& operator=(
const input_event_data dataPackage);
2756 respond_to_input_event_data(
const input_event_data dataPackage);
2767 respond_to_input_event_data& addButton(
bool disabled,
const jsonifier::string& customIdNew,
const jsonifier::string& buttonLabel,
button_style buttonStyle,
2768 const jsonifier::string& emojiName =
"", snowflake emojiId = snowflake{},
const jsonifier::string& url =
"");
2780 respond_to_input_event_data& addSelectMenu(
bool disabled,
const jsonifier::string& customIdNew,
const jsonifier::vector<select_option_data>& options,
2781 const jsonifier::string& placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type,
2782 jsonifier::vector<channel_type> channelTypes = jsonifier::vector<channel_type>{});
2796 respond_to_input_event_data& addModal(
const jsonifier::string& topTitleNew,
const jsonifier::string& topCustomIdNew,
const jsonifier::string& titleNew,
2797 const jsonifier::string& customIdNew,
bool required, uint64_t minLength, uint64_t maxLength,
text_input_style inputStyle,
const jsonifier::string& label =
"",
2798 const jsonifier::string& placeholder =
"");
2803 respond_to_input_event_data& addFile(
const file& theFile);
2808 respond_to_input_event_data& addAllowedMentions(
const allowed_mentions_data& dataPackage);
2818 respond_to_input_event_data& addComponentRow(
const action_row_data& dataPackage);
2823 respond_to_input_event_data& addMessageEmbed(
const embed_data dataPackage);
2828 respond_to_input_event_data& addContent(
const jsonifier::string& dataPackage);
2833 respond_to_input_event_data& setTTSStatus(
bool enabledTTs);
2840 respond_to_input_event_data& setAutoCompleteChoice(discord_core_internal::etf_serializer value,
const jsonifier::string& theName,
2841 const unordered_map<jsonifier::string, jsonifier::string>& theNameLocalizations);
2846 respond_to_input_event_data& setTargetUserID(
const snowflake targetUserIdNew);
2849 jsonifier::vector<application_command_option_choice_data> choices{};
2850 jsonifier::vector<action_row_data> components{};
2851 allowed_mentions_data allowedMentions{};
2852 jsonifier::vector<embed_data> embeds{};
2853 jsonifier::string interactionToken{};
2855 jsonifier::vector<file> files{};
2856 interaction_type eventType{};
2857 jsonifier::string customId{};
2858 jsonifier::string content{};
2859 jsonifier::string title{};
2860 snowflake interactionId{};
2861 snowflake applicationId{};
2862 snowflake targetUserId{};
2863 snowflake channelId{};
2864 snowflake messageId{};
2872 template<
typename value_type>
friend struct jsonifier::core;
2882 message_response_base& addButton(
bool disabled,
const jsonifier::string& customIdNew,
const jsonifier::string& buttonLabel,
button_style buttonStyle,
2883 const jsonifier::string& emojiName =
"", snowflake emojiId = snowflake{},
const jsonifier::string& url =
"");
2895 message_response_base& addSelectMenu(
bool disabled,
const jsonifier::string& customIdNew,
const jsonifier::vector<select_option_data>& options,
2896 const jsonifier::string& placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type,
2897 jsonifier::vector<channel_type> channelTypes = jsonifier::vector<channel_type>{});
2911 message_response_base& addModal(
const jsonifier::string& topTitleNew,
const jsonifier::string& topCustomIdNew,
const jsonifier::string& titleNew,
2912 const jsonifier::string& customIdNew,
bool required, uint64_t minLength, uint64_t maxLength,
text_input_style inputStyle,
const jsonifier::string& label =
"",
2913 const jsonifier::string& placeholder =
"");
2918 message_response_base& addFile(
const file& theFile);
2923 message_response_base& addAllowedMentions(
const allowed_mentions_data& dataPackage);
2928 message_response_base& addComponentRow(
const action_row_data& dataPackage);
2933 message_response_base& addMessageEmbed(
const embed_data& dataPackage);
2938 message_response_base& addContent(
const jsonifier::string& dataPackage);
2943 message_response_base& setTTSStatus(
bool enabledTTs);
2946 jsonifier::vector<action_row_data> components{};
2947 allowed_mentions_data allowedMentions{};
2948 jsonifier::vector<embed_data> embeds{};
2949 jsonifier::vector<file> files{};
2950 jsonifier::string customId{};
2951 jsonifier::string content{};
2952 jsonifier::string title{};
2959 interaction_callback_data data{};
2962 interaction_response_data& operator=(
const respond_to_input_event_data& other);
2964 interaction_response_data(
const respond_to_input_event_data& other);
2966 interaction_response_data() =
default;
2972 jsonifier::vector<application_command_permission_data> permissions{};
2973 snowflake applicationId{};
2974 snowflake guildId{};
2989 uint64_t contentSize{};
2990 jsonifier::string urlPath{};
3000 friend class discord_core_internal::sound_cloud_request_builder;
3001 friend class discord_core_internal::you_tube_request_builder;
3002 friend class discord_core_internal::sound_cloud_api;
3003 friend class discord_core_internal::you_tube_api;
3004 friend class song_api;
3006 jsonifier::vector<download_url> finalDownloadUrls{};
3008 jsonifier::string secondDownloadUrl{};
3009 jsonifier::string firstDownloadUrl{};
3010 jsonifier::string addedByUserName{};
3011 jsonifier::string thumbnailUrl{};
3012 jsonifier::string description{};
3013 jsonifier::string songTitle{};
3014 jsonifier::string duration{};
3015 jsonifier::string viewUrl{};
3016 jsonifier::string songId{};
3017 snowflake addedByUserId{};
3018 uint64_t contentLength{};
3035 DCA_INLINE
bool areThereAnySongs() {
3045 DCA_INLINE
bool sendNextSong() {
3083 DCA_INLINE
void modifyQueue(uint64_t firstSongPosition, uint64_t secondSongPosition) {
3084 song tempSong =
songQueue.at(firstSongPosition);
3086 songQueue.at(secondSongPosition) = tempSong;
3097 struct serializer_value {
3098 unordered_map<jsonifier::string, jsonifier::raw_json_data> values{};
3104 template<
typename value_type>
friend struct event_data;
3105 friend struct on_interaction_creation_data;
3107 command_data() =
default;
3109 command_data& operator=(command_data&&) =
default;
3111 command_data(command_data&&) =
default;
3113 command_data& operator=(
const command_data&);
3115 command_data(
const command_data&);
3117 command_data(
const input_event_data& inputEventData);
3121 const interaction_data& getInteractionData()
const;
3125 const guild_member_data& getGuildMemberData()
const;
3129 const channel_data& getChannelData()
const;
3133 const message_data& getMessageData()
const;
3141 jsonifier::string getCommandName()
const;
3145 jsonifier::string getSubCommandName()
const;
3149 jsonifier::string getSubCommandGroupName()
const;
3153 serializer_value getCommandArguments()
const;
3157 const input_event_data& getInputEventData()
const;
3159 virtual ~command_data() =
default;
3162 unique_ptr<input_event_data> eventData{};
3163 jsonifier::string subCommandGroupName{};
3164 jsonifier::string subCommandName{};
3165 jsonifier::string commandName{};
3166 serializer_value optionsArgs{};
3171 base_function_arguments() =
default;
3173 base_function_arguments(
const command_data& commandData);
3178 jsonifier::string helpDescription{};
3179 jsonifier::string commandName{};
3180 embed_data helpEmbed{};
3184 virtual void execute(
const base_function_arguments& args) = 0;
3185 virtual unique_ptr<base_function> create() = 0;
3186 virtual ~base_function() =
default;
3189 struct DiscordCoreAPI_Dll move_through_message_pages_data {
3190 input_event_data inputEventData{};
3191 jsonifier::string buttonId{};
3192 uint32_t currentPageIndex{};
3195 DiscordCoreAPI_Dll move_through_message_pages_data moveThroughMessagePages(
snowflake userID,
input_event_data originalEvent, uint32_t currentPageIndex,
3196 const jsonifier::vector<embed_data>& messageEmbeds,
bool deleteAfter, uint32_t waitForMaxMs,
bool returnResult);
3201 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
3202 jsonifier::vector<jsonifier::string> trace{};
3203 jsonifier::string resumeGatewayUrl{};
3204 application_data application{};
3205 jsonifier::string sessionId{};
3206 jsonifier::string shard{};
jsonifier::string name
Name of the account.
Action row data of message components.
jsonifier::vector< component_data > components
Array of components to make up the action-row.
Allowable mentions for a message.
bool repliedUser
For replies, whether to mention the author of the message being replied to (default false).
jsonifier::vector< jsonifier::string > roles
Array of role_ids to mention (max size of 100)
jsonifier::vector< jsonifier::string > users
Array of user_ids to mention (max size of 100)
jsonifier::vector< jsonifier::string > parse
A vector of allowed mention types to parse from the content.
Data structure representing an application_command_data.
snowflake applicationId
The current application id.
jsonifier::vector< application_command_option_data > options
A vector of possible options for the current application_command_data.
unordered_map< jsonifier::string, jsonifier::string > descriptionLocalizations
Dictionary with keys in available locales.
application_command_type type
The type of application_command_data.
permission defaultMemberPermissions
Set of permissions represented as a bit set all.
unordered_set< jsonifier::string > jsonifierExcludedKeys
Keys to exclude at serialization time.
snowflake guildId
(where applicable) a guild id for which guild to assign this application_command_data to.
jsonifier::string description
A description of the current application_command_data.
bool dmPermission
Indicates whether the command is available in dms with the app, only for globally - scoped commands.
jsonifier::string version
An autoincremented version.
unordered_map< jsonifier::string, jsonifier::string > nameLocalizations
Dictionary with keys in available locales.
jsonifier::string name
Name of the current application_command_data.
Data structure representing an application_command_data's option choice.
jsonifier::string name
The name of the current choice.
unordered_map< jsonifier::string, jsonifier::string > nameLocalizations
Dictionary with keys in available locales localization dictionary for the name.
jsonifier::raw_json_data value
The value of the option.
Permissions data for an application_command_data.
bool permission
Whether the permission_types is active or not.
application_command_permission_type type
The type of permission_types.
jsonifier::string termsOfServiceUrl
Terms of service url.
snowflake guildId
Guild id.
jsonifier::vector< jsonifier::string > tags
Up to 5 tags describing the content and functionality of the application install_params.
application_flags flags
Application flags.
jsonifier::vector< jsonifier::string > rpcOrigins
Array of rpc origin strings.
jsonifier::string slug
Sluhg.
jsonifier::string coverImage
The cover image.
jsonifier::string summary
Summary of the application.
bool botRequireCodeGrant
Does the bot require a code grant?
user_data owner
Application's owner.
jsonifier::string icon
Application's icon.
jsonifier::string verifyKey
The verification key.
team_object_data team
Team object data.
jsonifier::string description
Description of the application.
jsonifier::string privacyPolicyUrl
Privacy policy url.
install_params_data params
Settings for the application's default in-app authorization link, if enabled.
jsonifier::string primarySkuId
Primary sku snowflake.
jsonifier::string name
Application's name.
bool botPublic
Is the bot public?
jsonifier::string description
A description of the attachment.
jsonifier::string filename
The file name of the attachment.
uint64_t height
The height of the attachment.
uint64_t size
The size of the attachment.
jsonifier::string contentType
Type of content for the attachment.
jsonifier::string proxyUrl
The proxy url for the attachment.
uint64_t width
The width of the attachment.
bool ephemeral
Whether it was an ephemeral response.
jsonifier::string url
The url for the attachment.
optional_audit_entry_info_data options
Audit log entry info data.
jsonifier::string reason
The reason that was entered for the given change.
jsonifier::vector< audit_log_change_data > changes
Array of audit log change data.
snowflake targetId
snowflake of the target user_data.
audit_log_event actionType
Audit log action type.
time_stamp createdTimeStamp
Time at which this entry was created.
snowflake userId
snowflake of the executing user_data.
Represents an auto-moderation-rule.
jsonifier::vector< action_data > actions
Actions which will execute when the rule is triggered.
snowflake creatorId
The user which first created this rule.
snowflake guildId
The guild which this rule belongs to.
trigger_type triggerType
The rule trigger type.
event_type eventType
The rule event type.
trigger_meta_data triggerMetaData
The rule trigger metadata actions array of action objects the.
jsonifier::vector< snowflake > exemptRoles
The role ids that should not be affected by the rule(maximum of 20).
bool enabled
Whether the rule is enabled.
jsonifier::string name
The rule name.
jsonifier::vector< snowflake > exemptChannels
The channel ids that should not be affected by the rule(maximum of 50).
A type of user_data, to represent the bot and some of its associated endpoints.
Data structure representing a single channel_data.
Channel_data mention data.
snowflake guildId
The id of the guild where it took place.
channel_type type
The type of channel_data that was mentioned.
jsonifier::string name
The name of the channel_data that was mentioned.
Command data, for functions executed by the command_controller.
Data structure representing a single emoji.
Guild application command permissions data.
Represents the permissions for accessing an application_command_data from within a guild.
snowflake guildId
The guild's id.
jsonifier::vector< application_command_permission_data > permissions
The permissions.
snowflake applicationId
The application's id.
Data structure representing a single guild, for the purposes of populating the cache.
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.
jsonifier::string scheduledStartTime
The time the scheduled event will start.
guild_scheduled_event_status status
The status of the scheduled event.
guild_scheduled_event_privacy_level privacyLevel
The privacy level of the scheduled event.
jsonifier::string description
The description of the scheduled event(1 - 1000 characters.
snowflake guildId
The guild id which the scheduled event belongs to.
jsonifier::string name
The name of the scheduled event(1 - 100 characters).
snowflake creatorId
The id of the user_data that created the scheduled event *.
jsonifier::string scheduledEndTime
The time the scheduled event will end, required if entity_type is external.
snowflake channelId
The channel_data id in which the scheduled event will be hosted, or null if scheduled entity type is ...
snowflake entityId
The id of an entity associated with a guild scheduled event.
uint32_t userCount
The number of users subscribed to the scheduled event.
guild_scheduled_event_metadata entityMetadata
Additional metadata for the guild scheduled event.
user_data creator
The user_data that created the scheduled event.
guild_scheduled_event_entity_type entityType
The type of the scheduled event.
jsonifier::string type
Type of integration.
bool revoked
Has it been revoked?
account_data account
Account data.
application_data application
Application data.
uint64_t subscriberCount
Number of current subscribers.
bool enableEmoticons
Emoticons enabled?
user_data user
User_data data for the integration.
jsonifier::string syncedAt
Time it was last synced at.
jsonifier::string name
Name of the integration.
uint64_t expireBehavior
What to do upon expiry.
bool syncing
Is it syncing?
snowflake roleId
Role_data snowflake.
uint64_t expireGracePeriod
How int64_t before the integration expires.
The core of a message's data structure.
jsonifier::vector< embed_data > embeds
Array of message embeds.
jsonifier::vector< channel_mention_data > mentionChannels
Array of channel_data mention data.
jsonifier::string content
The message's content.
message_activity_data activity
Message activity data.
snowflake guildId
The id of the guild the message was sent in.
jsonifier::vector< action_row_data > components
Array of action row data.
time_stamp timeStamp
The timeStamp of when the message was created.
guild_member_data member
The author's guild member data.pplication data.
bool tts
Is it a text-to-speech message_data?
jsonifier::vector< attachment_data > attachments
Array of attachment data.
message_reference_data messageReference
Message reference data.
application_data application
A.
snowflake webHookId
Web_hook id of the message_data, if applicable.
jsonifier::vector< sticker_data > stickers
Array of message sticker_data data.
jsonifier::string nonce
Nonce.
jsonifier::string editedTimestamp
The time at which it was edited.
jsonifier::vector< sticker_item_data > stickerItems
Array of message sticker_data item data.
channel_data thread
The thread_data that the message was sent in, if applicable.
user_data author
The author's user_data data.
message_interaction_data interaction
Message interaction data.
snowflake channelId
The channel_data it was sent in.
jsonifier::vector< jsonifier::string > mentionRoles
Jsonifier::vector of "mention roles" ids.
message_type type
Message type.
jsonifier::vector< user_data > mentions
Array of user_data data, for individual's that were mentioned.
bool mentionEveryone
Does the message mention everyone?
snowflake applicationId
Application id.
Message interaction data.
Message response base, for responding to messages.
audit log entry info data
snowflake messageId
Message snowflake.
jsonifier::string roleName
Role_data name.
jsonifier::string type
Type.
snowflake channelId
channel_data snowflake.
jsonifier::string deleteMemberDays
Number of days for which the member's messages were deleted.
jsonifier::string count
count.
jsonifier::string membersRemoved
Number of members that were removed upon a prune.
snowflake applicationId
Id of the app whose permissions were targeted APPLICATION_COMMAND_PERMISSION_UPDATE.
A permission_types overwrite, for a given channel.
permissions_parse allow
collection of permissions to allow.
permission_overwrites_type type
Role_data or user_data type.
permissions_parse deny
collection of permissions to deny.
Data structure representing a single emoji.
/// data structure representing a single reaction.
bool me
Whether or not i (the bot) placed it.
emoji_data emoji
The emoji that was placed as a reaction.
guild_member_data member
The guild_member_data who placed the reaction.
snowflake channelId
The id of the channel_data where it was placed.
snowflake guildId
The id of the guild where it was placed.
snowflake userId
The id of the user_data who placed the reaction.
snowflake messageId
The id of the message upon which it was placed.
uint64_t count
The number of times this particular emoji was placed as a reaction to the given message_data.
Data structure representing a single role_data.
Represents a single selection from a select-menu.
jsonifier::string value
A value for identifying the option.
jsonifier::string label
A visible label for the select-menu-option.
jsonifier::string description
Description of the select-menu-option.
partial_emoji_data emoji
An optional emoji to put on it.
bool _default
Is it the default option?
A class representing a snowflake identifier with various operations.
uint64_t id
The snowflake id.
bool discoverableDisabled
Is it discoverable?
snowflake guildId
The guild id for which the channel_data exists in.
snowflake channelId
The channel_data's id.
stage_instance_privacy_level privacyLevel
Privacy level of the channel_data.
jsonifier::string topic
The topic of the stage_instance_data.
Data representing a single sticker_data.
uint64_t nsfwLevel
Nsfw warning level.
jsonifier::string tags
Tags for the sticker_data to use.
jsonifier::string name
The sticker_data's name.
sticker_type type
The type of sticker_data.
jsonifier::string description
Description of the sticker_data.
user_data user
The user_data that uploaded the guild sticker_data.
sticker_flags flags
Sticker_data flags.
uint64_t sortValue
Where in the stack of stickers it resides.
sticker_format_type formatType
Format type.
jsonifier::string asset
Asset value for the sticker_data.
jsonifier::string packId
Pack id of the sticker_data.
snowflake guildId
The guild id for which the sticker_data exists in.
Message sticker_data item data.
sticker_item_type formatType
Message sticker_data item type.
jsonifier::string name
The name of the sticker_data.
jsonifier::string icon
Icon for the team.
jsonifier::vector< team_members_object_data > members
Array of team members object data.
snowflake ownerUserId
User_data id of the team owner.
Represents a single thread_data.
Data for a single member of a thread_data.
snowflake userId
The user_data's id.
jsonifier::string joinTimestamp
The time at which the member joined this thread_data.
Represents a thread_data-members-update.
snowflake guildId
Guild id of the thread_data.
uint32_t memberCount
Number of guild-members in the thread_data.
jsonifier::vector< jsonifier::string > removedMemberIds
Members who have been removed.
jsonifier::vector< thread_member_data > addedMembers
New members added to the thread_data.
guild_data sourceGuild
Source guild id.
channel_data sourceChannel
channel_data for which th web_hook_data was issued.
snowflake applicationId
Application id.
jsonifier::string token
Token of the web_hook_data.
jsonifier::string name
Name of the web_hook_data.
snowflake channelId
channel_data id for which the web_hook_data was issued.
web_hook_type type
Type of web_hook_data.
snowflake guildId
Guild id for which the web_hook_data was issued.
user_data user
User_data which create the web_hook_data.
jsonifier::string url
Url of the web_hook_data.
jsonifier::string avatar
Avatar of the web_hook_data.
input_event_response_type
Input event response types.
button_style
Button styles.
message_type
Message types.
forum_layout_types
forum layout types.
system_channel_flags
System channel flags.
application_flags
application flags, for the application_data structure.
sticker_item_type
Sticker_data item types.
sticker_format_type
Sticker_data format types.
guild_scheduled_event_status
Guild_scheduled_event_status.
application_command_permission_type
Application command permission-types.
premium_tier
Premium tier levels.
explicit_content_filter_level
Explicit content filter levels.
message_activity_type
Message activity types.
interaction_callback_type
Interaction callback types.
audit_log_event
Audit log events.
verification_level
/// verification levels.
channel_type
Channel_data types.
text_input_style
Text input style for modals.
stage_instance_privacy_level
Stage instance privacy levels.
sticker_type
Sticker_data types.
sort_order_types
The sorting order, for guild forum channels.
user_flags
User_data flags.
component_type
Component types.
widget_style_options
Widget style options.
guild_scheduled_event_privacy_level
Guild scheduled event privacy levels.
guild_nsfwlevel
Guild nsfw level.
permission_overwrites_type
Permission_types overwrites types.
keyword_preset_type
Keyword preset types for auto-moderation.
event_type
Event types for auto-moderation.
application_command_type
Application command types.
afk_time_out_durations
Afk timeout durations.
application_command_option_type
Application command-option types.
premium_type
Premium types denote the level of premium a user has.
invite_target_types
Invite target types.
permission
Permission values, for a given channel, by role_data or guild_member_data.
thread_type
Thread_data types.
default_message_notification_level
Default message notification levels.
timeout_durations
Timeout durations for the timeout command.
message_flags
Message flags.
guild_scheduled_event_entity_type
Guild scheduled event entity types.
web_hook_type
Web_hook_data types.
action_type
Action types for auto-moderation.
trigger_type
Trigger types for auto-moderation.
connection_visibility_types
Connection visibility types.
interaction_type
Interaction types.
thread_auto_archive_duration
Automatic thread_data archiving durations.
@ Guild_Discovery_Grace_Period_Final_Warning
Guild discovery grade period final warning.
@ User_Premium_Guild_Subscription
User_data premium guild subscription.
@ Guild_Discovery_Grace_Period_Initial_Warning
Guild discovery grade period initial warning.
@ User_Premium_Guild_Subscription_Tier_3
User_data premium guild subscription tier 3.
@ Guild_Member_Join
Guild memeber join.
@ Context_Menu_Command
context menu command.
@ Recipient_Add
Recipient add.
@ User_Premium_Guild_Subscription_Tier_2
User_data premium guild subscription tier 2.
@ Channel_Icon_Change
channel_data icon change.
@ Channel_Follow_Add
channel_data follow add.
@ Thread_Created
Thread_data created.
@ Guild_Discovery_Requalified
Guild discovery requalified.
@ Channel_Pinned_Message
channel_data pinned message.
@ Recipient_Remove
Recipient erase.
@ Channel_Name_Change
channel_data name change.
@ Thread_Starter_Message
Thread_data starter message_data.
@ Guild_Invite_Reminder
Guild invite reminder.
@ Chat_Input_Command
chat input command.
@ Guild_Discovery_Disqualified
Guild discovery disqualified.
@ User_Premium_Guild_Subscription_Tier_1
User_data premium guild subscription tier 1.
@ List_View
Display posts as a list.
@ Not_set
No default has been set for forum channel.
@ Gallery_View
Display posts as a collection of tiles.
@ Suppress_Join_Notification_Replies
Hide member join sticker reply buttons.
@ Suppress_Guild_Reminder_Notifications
Suppress server setup tips.
@ Suppress_Join_Notifications
Suppress member join notifications.
@ Suppress_Premium_Subscriptions
Suppress server boost notifications.
@ Verificatino_Pending_Guild_Limit
Indicates unusual growth of an app that prevents verification.
@ Gateway_Guild_Members
Intent required for bots in 100 or more servers to receive member-related events like guild_member_ad...
@ Gateway_Message_Content_Limited
Intent required for bots in under 100 servers to receive message content, found in bot settings}...
@ Gateway_Guild_Members_Limited
Intent required for bots in under 100 servers to receive member-related events like guild_member_add,...
@ embedded
Indicates if an app is embedded within the discord client (currently unavailable publicly)
@ Gateway_Presence_Limited
Intent required for bots in under 100 servers to receive presence_update events, found in bot setting...
@ Gateway_Message_Content
Intent required for bots in 100 or more servers to receive message content.
@ Gateway_Presence
Intent required for bots in 100 or more servers to receive presence_update events.
@ All_Members
All members.
@ Members_Without_Roles
Members without roles.
@ Join_Request
Join-request.
@ Deferred_Channel_Message_With_Source
Ack an interaction and edit a response later, the user sees a loading state.
@ Channel_Message_With_Source
Respond to an interaction with a message.
@ Deferred_Update_Message
For components, ack an interaction and edit the original message later; the user does not see a loadi...
@ Modal
Respond to an interaction with a popup modal.
@ Application_Command_Autocomplete_Result
Respond to an autocomplete interaction with suggested choices.
@ Update_Message
For components, edit the message the component was attached to.
@ Member_Kick
Member kick.
@ Webhook_Delete
Webhook delete.
@ Channel_Overwrite_Update
channel_data overwrite update.
@ Message_Delete
Message delete.
@ Emoji_Delete
Emoji delete.
@ Invite_Create
Invite create.
@ Sticker_Update
Sticker_data update.
@ Webhook_Update
Webhook update.
@ Invite_Update
Invite update.
@ Channel_Overwrite_Create
channel_data overwrite create.
@ Member_Update
Member update.
@ Channel_Update
channel_data update.
@ Message_Bulk_Delete
Message bulk delete.
@ Role_Create
Role_data create.
@ Emoji_Update
Emoji update.
@ Channel_Overwrite_Delete
channel_data overwrite delete.
@ Auto_Moderation_Rule_Update
Auto moderation rule was updated.
@ Application_Command_Permission_Update
Permissions were updated for a command.
@ Integration_Delete
Integration delete.
@ Role_Update
Role_data update.
@ Guild_Scheduled_Event_Create
Guild-scheduled-event create.
@ Stage_Instance_Update
Stage-instance update.
@ Member_Prune
Member prune.
@ Guild_Scheduled_Event_Update
Guild-scheduled-event update.
@ Member_Ban_Add
Member ban add.
@ Thread_Update
Thread_data update.
@ Sticker_Delete
Sticker_data delete.
@ Integration_Create
Integration create.
@ Channel_Create
channel_data create.
@ Member_Role_Update
Member role update.
@ Stage_Instance_Create
Stage-instance create.
@ Message_Pin
Message pin.
@ Auto_Moderation_Block_Message
Message was blocked by auto_mod (according to a rule).
@ Message_Unpin
Message unpin.
@ Member_Disconnect
Member disconnect.
@ Guild_Scheduled_Event_Delete
Guild-scheduled-event delete.
@ Member_Ban_Remove
Member ban erase.
@ Stage_Instance_Delete
Stage-instance delete.
@ Member_Move
Member move.
@ Webhook_Create
Webhook create.
@ Thread_Delete
Thread_data delete.
@ Sticker_Create
Sticker_data create.
@ Thread_Create
Thread_data create.
@ Guild_Update
Guild update.
@ Emoji_Create
Emoji create.
@ Auto_Moderation_Rule_Delete
Auto moderation rule was deleted.
@ Role_Delete
Role_data delete.
@ Auto_Moderation_Rule_Create
Auto moderation rule was created.
@ Integration_Update
Integration update.
@ Invite_Delete
Invite delete.
@ Channel_Delete
channel_data delete.
@ Dm
A direct message between users.
@ Guild_Announcement
A channel that users can follow and crosspost into their own server (formerly news channels).
@ Group_DM
A direct message between multiple users.
@ Announcement_Thread
A temporary sub-channel within a GUILD_ANNOUNCEMENT channel.
@ Guild_Stage_Voice
A voice channel for hosting events with an audience.
@ Guild_Text
A text channel within a server.
@ Guild_Voice
A voice channel within a server.
@ Guild_Category
An organizational category that contains up to 50 channels.
@ Guild_Directory
The channel in a hub containing the listed servers.
@ Private_Thread
A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those ...
@ Guild_Forum
channel_data that can only contain threads.
@ Public_Thread
A temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel.
@ Paragraph
A multi-line input.
@ Latest_Activity
Sort forum posts by activity.
@ Creation_Date
Sort forum posts by creation time(from most recent to oldest).
@ Bug_Hunter_Level_1
Bug hunter level 1.
@ Bot_Https_Interactions
Bot uses only https interactions and is shown in the online member list.
@ Mfaenabled
Is mfa enabled?
@ Verified
Is it verified?
@ Bug_Hunter_Level_2
Bug hunter level 2.
@ Premium_Early_Suppoerter
Early nitro supporter.
@ Hypesquad
Hype_squad events member.
@ Partner
Partnered server owner.
@ Verified_Developer
Early verified bot developer.
@ Hypesquad_Online_House_1
House bravery member.
@ Hypesquad_Online_House_2
House brilliance member.
@ System
Is it a system integration?
@ Team_Pseudo_User
User_data is a team.
@ Certified_Moderator
Discord certified moderator.
@ Verified_Bot
Verified bot.
@ Hypesquad_Online_House_3
House balance member.
@ 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.
@ Age_Restricted
Age restricted.
@ Sexual_Content
Words that refer to sexually explicit behavior or activity.
@ Profanity
Words that may be considered forms of swearing or cursing.
@ Slurs
Personal insults or words that may be considered hate speech.
@ Message_Send
When a member sends or edits a message in the guild.
@ String
Jsonifier::string.
@ Sub_Command
Sub-command.
@ Channel_Data
channel_data.
@ Sub_Command_Group
Sub-command group.
@ Mentionable
Mentionable.
@ guilds
Intent for receipt of guild information.
@ Nitro_Classic
Nitro classic.
@ Large
Is it a large guild?
@ Unavailable
Unavailable.
@ Widget_enabled
Widget enabled.
@ Premium_Progress_Bar_Enabled
Premium progress bar enabled.
@ Embedded_Application
Embedded application.
@ Guild_News_Thread
Guild news thread_data.
@ Guild_Public_Thread
Guild public thread_data.
@ Guild_Private_Thread
Guild protected thread_data.
@ All_Messages
All messages.
@ Only_Mentions
Only mentions.
@ Minute
1 minute timeout.
@ None
None - erase timeout.
@ Ten_Minutes
10 minute timeout.
@ Five_Minutes
5 minute timeout.
@ Source_Message_Deleted
Source message deleted.
@ Is_Crosspost
Is crosspost.
@ Crossposted
crossposted.
@ Has_Thread
Has thread_data.
@ Suppress_Embeds
Supress embeds.
@ State_Instance
Stage instance.
@ Channel_Follower
channel_data follower.
@ Application
Application.
@ Block_Message
Blocks the content of a message according to the rule.
@ Timeout
Timeout user for a specified duration.
@ Send_Alert_Message
Logs user content to a specified channel.
@ Keyword
check if content contains words from a user defined list of keywords.
@ Mention_Spam
check if content contains more unique mentions than allowed.
@ Keyword_Preset
check if content contains words from internal pre-defined wordsets.
@ Spam
check if content represents generic spam.
@ Message_Component
Message component.
@ Application_Command_Autocomplete
Application command autocomplete.
@ Application_Command
Application command.
@ Modal_Submit
Modal submission.
The main namespace for the forward-facing interfaces.
@ Neutral
For either type.
For representing a single auto-moderation-rule-action.
action_type type
The type of action.
action_meta_data metadata
Additional metadata needed during execution for this specific action type.
Data representing an active thread_data.
Application_command_data interaction data option.
jsonifier::vector< application_command_interaction_data_option > options
Application_command_data interaction data options.
application_command_option_type type
The type of application_command_data options.
bool focused
True if this option is the currently focused option for autocomplete.
jsonifier::string name
The name of the current option.
jsonifier::raw_json_data value
The value.
Data structure representing an application_command_data's option.
int64_t minValue
If the option is an integer or number type, the minimum value permitted.
bool autocomplete
If autocomplete interactions are enabled for this string, integer, or number type option.
jsonifier::string description
A description of the current application_command_data option.
jsonifier::vector< channel_type > channelTypes
Set when the application_command_data option type is set to channel_data.
bool required
If the parameter is required or optional– default false.
jsonifier::vector< application_command_option_choice_data > choices
A vector of possible choices for the current application_command_data option.
jsonifier::vector< application_command_option_data > options
A vector of possible options for the current application_command_data option.
jsonifier::string name
Name of the current application_command_data option.
application_command_option_type type
The type of command option.
unordered_map< jsonifier::string, jsonifier::string > nameLocalizations
Dictionary for the name localizations field.
int64_t maxValue
If the option is an integer or number type, the maximum value permitted.
unordered_map< jsonifier::string, jsonifier::string > descriptionLocalizations
Dictionary for the description localizations field.
Data representing an archived thread_data.
jsonifier::string key
The key of the audit log change.
jsonifier::string oldValue
Old value.
jsonifier::string newValue
New value.
Authorization info structure.
jsonifier::vector< jsonifier::string > scopes
Array of strings - the scopes the user_data has authorized the application for.
jsonifier::string expires
When the access token expires.
application_data application
Partial application object the current application.
bool failedDueToPerms
Failed due to perms?
user_data user
User_data that was banned.
jsonifier::string reason
Reason for the ban.
Base arguments for the command classes.
Base class for the command classes.
virtual void execute(const base_function_arguments &args)=0
The base function for the command's execute function.
Data for when some channel_data pins are updated.
snowflake guildId
The id of the guild within which the message was pinned.
time_stamp lastPinTimeStamp
The time of the last pinned message.
snowflake channelId
The id of the channel_data within which the message was pinned.
crtp-based struct for exposing the connectToVoice functionality of the guild-related classes.
DCA_INLINE voice_connection & connectToVoice(const snowflake guildMemberId, const snowflake channelId=0, bool selfDeaf=false, bool selfMute=false, stream_info streamInfoNew=stream_info{})
For connecting to an individual voice channel.
Represents a single user_data connection.
bool showActivity
Whether activities related to this connection will be shown in presence updates.on.
jsonifier::vector< integration_data > integrations
An array of partial server integrations.
bool verified
Whether the connection is verified.
bool revoked
Whether the connection is revoked.
jsonifier::string name
The username of the connection account.
connection_visibility_types visibility
Visibility of this connecti.
bool friendSync
Whether friend sync is enabled for this connection.
jsonifier::string type
The service of the connection(twitch, youtube).
For creating an application command.
Represents a download url.
jsonifier::string iconUrl
Icon url.
jsonifier::string name
Name.
jsonifier::string url
Url.
jsonifier::string proxyIconUrl
Proxy icon url.
unordered_set< jsonifier::string > jsonifierExcludedKeys
For excluding certain keys from parsing/serialization.
jsonifier::string value
The text on the field.
jsonifier::string name
The title of the field.
bool Inline
Is the field DCA_INLINE with the rest of them?
uint64_t height
Image height.
unordered_set< jsonifier::string > jsonifierExcludedKeys
For excluding certain keys from parsing/serialization.
jsonifier::string url
Image url.
jsonifier::string proxyUrl
Proxy url.
uint64_t width
Image width.
jsonifier::string url
Url.
jsonifier::string name
Name.
uint64_t height
Image height.
jsonifier::string url
Image url.
jsonifier::string proxyUrl
Proxy url.
uint64_t width
Image width.
jsonifier::string proxyUrl
Proxy url.
uint64_t width
Image width.
jsonifier::string url
Image url.
uint64_t height
Image height.
Data representing a file to be sent via multipart-form data.
jsonifier::string data
The data of the file.
jsonifier::string fileName
The name of the file.
bool moderated
Whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS per...
snowflake emojiId
The id of a guild's custom emoji.
jsonifier::string emojiName
The unicode character of the emoji.
jsonifier::string name
The name of the tag(0 - 20 characters).
Represents a forum thread message.
uint64_t flags
Flags to be set for the message.
jsonifier::vector< file > files
File contents the contents of the file being sent one of content, file, embed(s), sticker_ids.
jsonifier::vector< jsonifier::string > stickerIds
Array of snowflakes ids of up to 3 stickers in the server to send in the message.
jsonifier::vector< attachment_data > attachments
Array of partial attachment objects attachment objects with filename.
jsonifier::vector< embed_data > embeds
Array of embed objects embedded rich content (up to 6000 characters).
jsonifier::string content
The message contents (up to 2000 characters).
allowed_mentions_data allowedMentions
Allowed mention object allowed mentions for the message.
jsonifier::vector< action_row_data > components
Array of message component objects the components to include with the message.
Data from the get_gateway_bot endpoint.
uint32_t shards
The recommended number of shards to use when connecting.
session_start_data sessionStartLimit
Information on the current session start limit.
jsonifier::string url
The wss url that can be used for connecting to the gateway.
Data representing a guild emoji update event.
Data representing a single guild preview.
Data representing a single guild_scheduled_event_user.
user_data user
User_data which subscribed to an event.
snowflake guildScheduledEventId
The scheduled event id which the user_data subscribed to/.
guild_member_data member
Guild member data for this user_data for the guild which this event belongs to, if any.
Data representing a guild stickers update event.
Represents a guild template.
jsonifier::string description
The description for the template.
guild_data serializedSourceGuild
The guild snapshot this template contains.
jsonifier::string code
The template code(unique id).
user_data creator
The user_data who created the template.
bool isDirty
Whether the template has unsynced changes.
jsonifier::string updatedAt
When this template was last synced to the source guild.
uint32_t usageCount
Number of times this template has been used.
jsonifier::string createdAt
When this template was created.
jsonifier::string name
Template name.
jsonifier::string sourceGuildId
The id of the guild this template is based on.
jsonifier::string creatorId
The id of the user_data who created the template.
Install params data, for application data.
permissions_parse permissions
The permissions to request for the bot role.
jsonifier::vector< jsonifier::string > scopes
The scopes to add the application to the server with.
Interaction application_command_data callback data.
application_command_type type
The type of application_command.
snowflake targetId
The target message_data's id.
jsonifier::vector< action_row_data > components
Array of message componentsthe values submitted by the user.
resolved_data resolved
Resolved data.
component_type componentType
The type of the component.
jsonifier::vector< application_command_interaction_data_option > options
Application_command_data interaction data options.
jsonifier::string customId
The custom_id of the component.
jsonifier::string name
The name of the invoked command.
jsonifier::vector< jsonifier::string > values
Array of select option values the user selected in a select menu component.
snowflake guildId
The guild that the command took place in.
For storing interaction-related values.
Interaction response data.
uint64_t uses
The current number of uses.
jsonifier::string expiresAt
When the invite expires.
application_data targetApplication
Application data.
jsonifier::string createdAt
Time it was created at.
uint64_t maxUses
Max number of uses.
jsonifier::string code
Unique invite code.
guild_scheduled_event_data guildScheduledEvent
Scheduled guild event.
partial_guild_data guild
Guild data of the channel_data that the invite is for.
uint64_t targetType
Target type.
user_data inviter
The user_data who created the invite.
uint64_t approximateMemberCount
Approximate member count.
snowflake guildId
The guild this invite is for.
user_data targetUser
Target user_data of the invite.
stage_instance_data stageInstance
Stage instance data.
bool temporary
Is it temporary?
uint64_t approximatePresenceCount
Approximate presence count.
uint64_t maxAge
Maximum age of the invite.
channel_data channel
channel_data data of the channel_data that the invite is for.
jsonifier::string partyId
Party id.
message_activity_type type
Message activity type.
For storing message_data-related values.
snowflake guildId
snowflake of the guild that the referenced message was sent in.
snowflake messageId
snowflake of the message to reference.
snowflake channelId
snowflake of the channel_data that the referenced message was sent in.
bool failIfNotExists
Fail if the message doesn't exist?
Playlist of songs and other variables.
song currentSong
The current song that is playing.
bool isLoopAllEnabled
Is looping of the entire playlist currently enabled?
jsonifier::vector< song > songQueue
The list of songs that are stored to be played.
bool isLoopSongEnabled
Is looping of songs currently enabled?
client_status clientStatus
user_data's platform-dependent status
snowflake guildId
snowflake id of the guild.
jsonifier::vector< activity_data > activities
Array of activity objects user_data's current activities.
user_data user
User_data object user_data whose presence is being updated.
jsonifier::string status
Either "idle", "dnd", "online", or "offline".
unordered_map< snowflake, user_data > users
Unordered_map full of user_data.
unordered_map< snowflake, attachment_data > attachments
Unordered_map of snowflakes to attachment objects the ids.
unordered_map< snowflake, channel_data > channels
Unordered_map full of channel_data.
unordered_map< snowflake, role_data > roles
Unordered_map full of role_data.
unordered_map< snowflake, guild_member_data > members
Unordered_map full of guild_memeber_data.
unordered_map< snowflake, message_data > messages
Unordered_map full of messageData.
Data from the session_start info.
uint32_t total
The total number of session starts the current user_data is allowed.
uint32_t resetAfter
The number of milliseconds after which the limit resets.
uint32_t maxConcurrency
The number of identify requests allowed per 5 seconds.
uint32_t remaining
The remaining number of session starts the current user_data is allowed.
Song completion event data.
snowflake guildMemberId
The sending guild_member_data.
snowflake guildId
The sending guild.
bool wasItAFail
Is this a replay? (did a track recently fail to play?)
Represents a sticker_data pack.
jsonifier::string coverStickerId
snowflake of a sticker_data in the pack which is shown as the pack's icon.
jsonifier::string description
Description of the sticker_data pack.
jsonifier::string bannerAssetId
snowflake of the sticker_data pack's banner image.
jsonifier::vector< sticker_data > stickers
Array of sticker_data objects the stickers in the pack.
jsonifier::string name
Name of the sticker_data pack.
jsonifier::string skuId
snowflake of the pack's sku.
Team members object data.
user_data user
User_data data of the current user_data.
snowflake teamId
snowflake of the current team.
jsonifier::vector< permissions_parse > permissions
Permissions for the team.
uint64_t membershipState
current state.
Data for when threads are synced.
jsonifier::vector< thread_member_data > members
Array of members that are a part of the thread_data.
snowflake guildId
The id of the guild for which the threads are being synced.
jsonifier::vector< channel_data > threads
All active threads in the given channels that the current user_data can access.
jsonifier::vector< jsonifier::string > channelIds
The parent channel_data ids whose threads are being synced.
Representing "typing_start" data.
For updating/modifying a given channel's properties.
For updating the current voice state.
bool selfMute
Whether or not we self-mute ourselves.
std::nullptr_t channelId
snowflake of the desired voice channel_data. leave blank to disconnect.
snowflake guildId
The id of the guild fo which we would like to establish a voice connection.
bool selfDeaf
Whether or not we self-deafen ourselves.
For updating the current voice state.
bool selfDeaf
Whether or not we self-deafen ourselves.
bool selfMute
Whether or not we self-mute ourselves.
snowflake channelId
snowflake of the desired voice channel_data. leave blank to disconnect.
snowflake guildId
The id of the guild fo which we would like to establish a voice connection.
Structure representing voice region data.
bool optimal
True for a single server that is closest to the current user_data's client.
jsonifier::string name
Name of the region.
bool custom
Whether this is a custom voice region(used for events / etc).
bool deprecated
Whether this is a deprecated voice region(avoid switching to these).
snowflake channelId
The channel_data id this user_data is connected to.
snowflake guildId
The guild id this voice state is for.
snowflake userId
The user_data id this voice state is for.
bool selfMute
Whether this user_data is locally muted.
bool selfDeaf
Whether this user_data is locally deafened.
jsonifier::string requestToSpeakTimestamp
The time at which the user_data requested to speak.
bool selfStream
Whether this user_data is streaming using "go live".
bool mute
Whether this user_data is muted by the server.
bool selfVideo
Whether this user_data's camera is enabled.
bool suppress
Whether this user_data is muted by the current user_data.
jsonifier::string sessionId
The session id for this voice state.
bool deaf
Whether this user_data is deafened by the server.
Welcome screen channel_data data.
jsonifier::string emojiName
Emoji name for the channel_data.
snowflake emojiId
Emoji id for the channel_data.
jsonifier::string description
Description of the welcome channel_data.
snowflake channelId
snowflake of the welcome channel_data.
jsonifier::vector< welcome_screen_channel_data > welcomeChannels
Welcome screen channel_data data.
jsonifier::string description
Description of the welcome screen.