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 static constexpr jsonifier::string_view browser{
"DiscordCoreAPI" };
54 static constexpr jsonifier::string_view device{
"DiscordCoreAPI" };
56 static constexpr jsonifier::string_view os{
"Windows" };
58 static constexpr jsonifier::string_view os{
"Linux" };
60 static constexpr 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 static constexpr jsonifier::string_view protocol{
"udp" };
83 voice_socket_protocol_payload_data_data data{};
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> excludedKeys{};
331 jsonifier::string t{};
336 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>
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>
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 inline flag_entity() =
default;
426 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 inline jsonifier::string getUserImageUrl(user_image_types type)
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 inline get_user_image_url() =
default;
474 inline ~get_user_image_url() =
default;
478 enum class guild_member_image_types {
483 template<
typename value_type>
class get_guild_member_image_url {
485 jsonifier::string getGuildMemberImageUrl(guild_member_image_types type)
const {
486 jsonifier::string baseUrl{
"https://cdn.discordapp.com/" };
488 case guild_member_image_types::Avatar: {
489 baseUrl +=
"guilds/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->guildId) +
"/users/" +
490 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->user.id) +
"/avatars/" +
491 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->avatar) +
".png";
494 case guild_member_image_types::Banner: {
504 inline get_guild_member_image_url() =
default;
505 inline ~get_guild_member_image_url() =
default;
508 enum class guild_image_types {
511 Discovery_Splash = 2,
515 template<
typename value_type>
class get_guild_image_url {
517 jsonifier::string getGuildImageUrl(guild_image_types type)
const {
518 jsonifier::string baseUrl{
"https://cdn.discordapp.com/" };
520 case guild_image_types::Icon: {
521 baseUrl +=
"icons/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->
id) +
"/" +
522 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->icon) +
".png";
525 case guild_image_types::Splash: {
526 baseUrl +=
"splashes/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->
id) +
"/" +
527 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->splash) +
".png";
530 case guild_image_types::Discovery_Splash: {
531 baseUrl +=
"icons/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->
id) +
"/" +
532 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->discoverySplash) +
".png";
535 case guild_image_types::Banner: {
536 baseUrl +=
"banners/" +
static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->
id) +
"/" +
537 static_cast<jsonifier::string
>(
static_cast<const value_type*
>(
this)->banner) +
".png";
547 inline get_guild_image_url() =
default;
548 inline ~get_guild_image_url() =
default;
588 void generateExcludedKeys();
621 void generateExcludedKeys();
644 unordered_set<jsonifier::string> excludedKeys{};
645 jsonifier::vector<embed_field_data> fields{};
647 jsonifier::string description{};
651 jsonifier::string title{};
652 uint64_t hexColorValue{};
653 jsonifier::string type{};
656 jsonifier::string url{};
659 void generateExcludedKeys();
665 embed_data& setAuthor(jsonifier::string_view authorName, jsonifier::string_view authorAvatarUrl =
"");
671 embed_data& setFooter(jsonifier::string_view footerText, jsonifier::string_view footerIconUrlText =
"");
676 embed_data& setTimeStamp(jsonifier::string_view timeStamp);
683 embed_data& addField(jsonifier::string_view name, jsonifier::string_view value,
bool Inline =
true);
688 embed_data& setDescription(jsonifier::string_view descriptionNew);
693 embed_data& setColor(jsonifier::string_view hexColorValueNew);
698 embed_data& setThumbnail(jsonifier::string_view thumbnailUrl);
703 embed_data& setTitle(jsonifier::string_view titleNew);
708 embed_data& setImage(jsonifier::string_view imageUrl);
719 enum class media_type : uint8_t {
png = 0, gif = 1, jpeg = 2, mpeg = 3, mp3 = 4 };
785 struct voice_server_update_data {
786 jsonifier::string endpoint{};
788 jsonifier::string token{};
812 enum class role_flags : uint8_t { mentionable = 1 << 0, managed = 1 << 1, hoist = 1 << 2 };
815 class DiscordCoreAPI_Dll
user_data :
public get_user_image_url<user_data>,
public flag_entity<user_data> {
817 template<
typename value_type>
friend struct jsonifier::core;
818 friend class get_user_image_url<
user_data>;
820 jsonifier::string avatarDecoration{};
821 jsonifier::string discriminator{};
822 jsonifier::string globalName{};
823 jsonifier::string userName{};
824 jsonifier::string locale{};
825 jsonifier::string banner{};
826 jsonifier::string avatar{};
827 jsonifier::string email{};
828 uint64_t accentColor{};
829 int32_t premiumType{};
830 int32_t publicFlags{};
844 class DiscordCoreAPI_Dll
user_cache_data :
public get_user_image_url<user_cache_data>,
public flag_entity<user_cache_data> {
846 template<
typename value_type>
friend struct jsonifier::core;
849 jsonifier::string avatarDecoration{};
850 jsonifier::string discriminator{};
851 jsonifier::string globalName{};
852 jsonifier::string userName{};
853 jsonifier::string avatar{};
854 jsonifier::string banner{};
856 uint64_t accentColor{};
871 inline bool operator==(
const snowflake& other)
const {
877 class DiscordCoreAPI_Dll
role_data :
public flag_entity<role_data> {
879 jsonifier::string unicodeEmoji{};
880 permissions_parse permissions{};
881 jsonifier::string name{};
882 jsonifier::string icon{};
902 jsonifier::string unicodeEmoji{};
903 permissions permissionsVal{};
904 jsonifier::string name{};
921 inline bool operator==(
const snowflake& other)
const {
930 unordered_set<jsonifier::string> excludedKeys{};
931 jsonifier::string name{};
937 void generateExcludedKeys();
943 unordered_set<jsonifier::string> excludedKeys{};
944 jsonifier::vector<role_data>
roles{};
945 std::wstring unicodeName{ L
"" };
946 bool available{
true };
947 bool requireColons{};
951 void generateExcludedKeys();
954 enum class presence_update_flags : uint8_t {
955 Desktop_Online = 0b00000001,
956 Desktop_Idle = 0b00000010,
957 Desktop_Dnd = 0b000000011,
958 Mobile_Online = 0b00000010,
959 Mobile_Idle = 0b00000100,
960 Mobile_Dnd = 0b00000110,
961 Web_Online = 0b00000100,
962 Web_Idle = 0b00001000,
963 Web_Dnd = 0b00001100,
964 Status_Online = 0b00001000,
965 Status_Idle = 0b00010000,
966 Status_Dnd = 0b00011000
969 struct client_status {
970 jsonifier::string desktop{};
971 jsonifier::string mobile{};
972 jsonifier::string web{};
984 enum class guild_member_flags : uint8_t { Pending = 1 << 0, Deaf = 1 << 1, Mute = 1 << 2 };
990 inline user_id_base() =
default;
994 class guild_member_cache_data;
997 class DiscordCoreAPI_Dll
guild_member_data :
public flag_entity<guild_member_data>,
public get_guild_member_image_url<guild_member_data> {
999 template<
typename value_type>
friend class get_guild_member_image_url;
1000 template<
typename value_type>
friend struct jsonifier::core;
1001 template<
typename value_type>
friend struct event_data;
1006 jsonifier::string premiumSince{};
1007 permissions_parse permissions{};
1008 jsonifier::string avatar{};
1009 guild_member_flags flags{};
1010 jsonifier::string nick{};
1026 class DiscordCoreAPI_Dll
guild_member_cache_data :
public flag_entity<guild_member_cache_data>,
public get_guild_member_image_url<guild_member_cache_data> {
1028 template<
typename value_type>
friend struct jsonifier::core;
1029 template<
typename value_type>
friend struct std::hash;
1030 template<
typename value_type>
friend struct event_data;
1034 permissions permissionsVal{};
1035 guild_member_flags flags{};
1036 jsonifier::string nick{};
1038 user_id_base user{};
1057 user.id = snowFlake;
1076 enum class channel_flags : uint8_t { nsfw = 1 << 0, managed = 1 << 1 };
1078 struct default_reaction_data {
1079 jsonifier::string emojiName{};
1080 snowflake emojiId{};
1102 jsonifier::vector<over_write_data> permissionOverwrites{};
1103 jsonifier::vector<forum_tag_data> availableTags{};
1104 default_reaction_data defaultReactionEmoji{};
1105 jsonifier::vector<snowflake> appliedTags{};
1106 jsonifier::vector<user_data> recipients{};
1107 uint32_t defaultThreadRateLimitPerUser{};
1109 uint32_t defaultAutoArchiveDuration{};
1111 jsonifier::string lastPinTimestamp{};
1113 permissions_parse permissions{};
1114 jsonifier::string rtcRegion{};
1115 uint32_t totalMessageSent{};
1116 uint32_t rateLimitPerUser{};
1117 uint32_t videoQualityMode{};
1119 jsonifier::string topic{};
1122 jsonifier::string name{};
1123 jsonifier::string icon{};
1124 uint32_t messageCount{};
1125 uint32_t memberCount{};
1126 channel_flags flags{};
1128 uint32_t userLimit{};
1131 uint32_t position{};
1142 jsonifier::string getIconUrl();
1150 jsonifier::vector<over_write_data> permissionOverwrites{};
1152 jsonifier::string topic{};
1153 jsonifier::string name{};
1154 uint32_t memberCount{};
1156 channel_flags flags{};
1157 uint32_t position{};
1173 inline bool operator==(
const snowflake& other)
const {
1180 jsonifier::vector<thread_member_data> members{};
1181 jsonifier::vector<channel_data>
threads{};
1187 jsonifier::vector<thread_member_data> members{};
1188 jsonifier::vector<channel_data>
threads{};
1278 inline auto_moderation_rule_data() =
default;
1297 inline guild_application_command_permissions_data() =
default;
1302 jsonifier::vector<over_write_data> permissionOverwrites{};
1303 uint64_t defaultAutoArchiveDuration{ 10080 };
1304 uint64_t videoQualityMode{ 1 };
1305 jsonifier::string parentId{};
1306 jsonifier::string rtcRgion{};
1307 uint64_t rateLimitPerUser{};
1308 uint64_t bitrate{ 48000 };
1309 jsonifier::string topic{};
1310 jsonifier::string name{};
1311 uint64_t userLimit{};
1312 uint64_t position{};
1378 operator discord_core_internal::etf_serializer();
1388 operator discord_core_internal::etf_serializer();
1394 jsonifier::vector<team_members_object_data>
members{};
1399 inline team_object_data() =
default;
1416 jsonifier::vector<jsonifier::string>
scopes{};
1424 jsonifier::vector<jsonifier::string>
tags{};
1427 jsonifier::string customInstallUrl{};
1445 inline application_data() =
default;
1450 jsonifier::vector<jsonifier::string>
scopes{};
1462 inline account_data() =
default;
1492 jsonifier::string url{};
1514 inline integration_data() =
default;
1586 inline optional_audit_entry_info_data() =
default;
1604 jsonifier::vector<audit_log_change_data>
changes{};
1681 inline stage_instance_data() =
default;
1690 enum class sticker_flags : uint8_t { Available = 1 << 0 };
1709 inline sticker_data() =
default;
1714 jsonifier::vector<jsonifier::string> features{};
1715 jsonifier::vector<sticker_data>
stickers{};
1716 jsonifier::vector<emoji_data> emojis{};
1717 jsonifier::string discoverySplash{};
1718 uint64_t approximatePresenceCount{};
1719 uint64_t approximateMemberCount{};
1720 jsonifier::string description{};
1721 jsonifier::string splash{};
1722 jsonifier::string name{};
1723 jsonifier::string icon{};
1752 class guild_cache_data;
1779 jsonifier::string location{};
1801 inline guild_scheduled_event_data() =
default;
1835 jsonifier::string interactionToken{};
1850 unordered_set<jsonifier::string> excludedKeys{};
1854 void generateExcludedKeys();
1863 jsonifier::vector<application_command_option_choice_data>
choices{};
1864 jsonifier::vector<application_command_option_data>
options{};
1865 int64_t
minValue{ std::numeric_limits<int64_t>::max() };
1866 int64_t
maxValue{ std::numeric_limits<int64_t>::min() };
1867 unordered_set<jsonifier::string> excludedKeys{};
1875 void generateExcludedKeys();
1889 struct you_tube_format {
1890 jsonifier::string signatureCipher{};
1891 jsonifier::string audioSampleRate{};
1892 jsonifier::string audioQuality{};
1893 jsonifier::string downloadUrl{};
1894 jsonifier::string signature{};
1895 jsonifier::string mimeType{};
1896 jsonifier::string quality{};
1897 jsonifier::string codecs{};
1898 jsonifier::string aitags{};
1899 uint64_t averageBitrate{};
1900 int64_t contentLength{};
1929 enum class select_default_value_type { user = 0, role = 1, channel = 2 };
1931 class select_default_value_data {
1933 inline select_default_value_data() =
default;
1935 inline select_default_value_data(select_default_value_type typeNew) {
1937 case select_default_value_type::user: {
1941 case select_default_value_type::role: {
1945 case select_default_value_type::channel: {
1951 jsonifier::string type{};
1958 jsonifier::vector<jsonifier::string>
parse{};
1959 jsonifier::vector<jsonifier::string>
roles{};
1960 jsonifier::vector<jsonifier::string>
users{};
1992 struct DiscordCoreAPI_Dll component_data {
1993 jsonifier::vector<select_default_value_data> defaultValues{};
1994 unordered_set<jsonifier::string> excludedKeys{};
1995 jsonifier::vector<select_option_data> options{};
1996 jsonifier::vector<channel_type> channelTypes{};
1997 jsonifier::string placeholder{};
1998 jsonifier::string customId{};
1999 partial_emoji_data emoji{};
2000 jsonifier::string label{};
2001 jsonifier::string value{};
2002 jsonifier::string title{};
2003 jsonifier::string url{};
2005 uint64_t minValues{};
2006 uint64_t maxValues{};
2007 uint64_t minLength{};
2008 uint64_t maxLength{};
2013 void generateExcludedKeys();
2021 unordered_set<jsonifier::string> excludedKeys{};
2023 void generateExcludedKeys();
2039 jsonifier::vector<application_command_option_choice_data> choices{};
2040 jsonifier::vector<attachment_data> attachments{};
2041 unordered_set<jsonifier::string> excludedKeys{};
2042 jsonifier::vector<action_row_data> components{};
2044 jsonifier::vector<embed_data> embeds{};
2045 jsonifier::vector<file> files{};
2046 jsonifier::string customId{};
2047 jsonifier::string content{};
2048 jsonifier::string title{};
2052 void generateExcludedKeys();
2055 struct create_application_command_data;
2062 jsonifier::vector<application_command_option_data>
options{};
2074 inline application_command_data() =
default;
2076 void generateExcludedKeys();
2078 bool operator==(
const application_command_data&)
const;
2114 inline thread_members_update_data() =
default;
2121 jsonifier::string name{};
2203 jsonifier::vector<reaction_data>
reactions{};
2241 unordered_map<jsonifier::string, guild_member_data>
members{};
2242 unordered_map<jsonifier::string, channel_data>
channels{};
2243 unordered_map<jsonifier::string, message_data>
messages{};
2244 unordered_map<jsonifier::string, user_data>
users{};
2245 unordered_map<jsonifier::string, role_data>
roles{};
2278 struct application_command_interaction_data_option;
2282 jsonifier::vector<application_command_interaction_data_option>
options{};
2291 jsonifier::vector<application_command_interaction_data_option>
options{};
2293 jsonifier::vector<jsonifier::string>
values{};
2327 jsonifier::vector<emoji_data> emojis{};
2333 jsonifier::vector<sticker_data>
stickers{};
2337 struct guild_members_chunk_event_data {
2338 jsonifier::vector<presence_update_data> presences{};
2339 jsonifier::vector<jsonifier::string> notFound{};
2340 jsonifier::vector<guild_member_data> members{};
2341 jsonifier::string nonce{};
2342 uint64_t chunkIndex{};
2343 uint64_t chunkCount{};
2344 snowflake guildId{};
2350 template<
typename value_type>
friend class get_user_image_url;
2353 bot_user(
user_data& dataPackage, discord_core_internal::base_socket_agent* pBaseBaseSocketAgentNew);
2366 discord_core_internal::base_socket_agent* baseSocketAgent{};
2378 template<guild_member_t value_type> two_id_key::two_id_key(
const value_type& other) {
2379 idOne = other.guildId;
2380 idTwo = other.user.id;
2383 template<voice_state_t value_type> two_id_key::two_id_key(
const value_type& other) {
2384 idOne = other.guildId;
2385 idTwo = other.userId;
2389 template<
typename value_type,
typename discord_core_client_t,
typename guild_members_type>
struct connect_to_voice {
2399 if (
static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())
2400 ->getVoiceConnection(
static_cast<value_type*
>(
this)->
id)
2401 .areWeConnected()) {
2402 return static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->id);
2403 }
else if (guildMemberId != 0 || channelId != 0) {
2404 snowflake channelIdNew{};
2405 if (guildMemberId != 0) {
2406 voice_state_data_light dataLight{};
2407 dataLight.guildId =
static_cast<value_type*
>(
this)->
id;
2408 dataLight.userId = guildMemberId;
2409 guild_member_data getData{};
2410 getData.guildId =
static_cast<value_type*
>(
this)->
id;
2411 getData.user.
id = guildMemberId;
2412 auto voiceStateData = guild_members_type::getVoiceStateData(getData);
2413 if (voiceStateData.channelId != 0) {
2414 channelIdNew = voiceStateData.channelId;
2417 channelIdNew = channelId;
2419 int32_t theShardId{
static_cast<int32_t
>((
static_cast<value_type*
>(
this)->
id.
operator const uint64_t&() >> 22) %
2420 static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getConfigManager().getTotalShardCount()) };
2421 voice_connect_init_data voiceConnectInitData{};
2422 voiceConnectInitData.currentShard = theShardId;
2423 voiceConnectInitData.streamInfo = streamInfoNew;
2424 voiceConnectInitData.channelId = channelIdNew;
2425 voiceConnectInitData.guildId =
static_cast<value_type*
>(
this)->
id;
2426 voiceConnectInitData.userId =
static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getBotUser().id;
2427 voiceConnectInitData.selfDeaf = selfDeaf;
2428 voiceConnectInitData.selfMute = selfMute;
2429 auto& voiceConnectionNew =
2430 static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->id);
2431 stop_watch<milliseconds> stopWatch{ milliseconds{ 10000 } };
2433 voiceConnectionNew.connect(voiceConnectInitData);
2434 while (!voiceConnectionNew.areWeConnected()) {
2435 if (stopWatch.hasTimeElapsed()) {
2438 std::this_thread::sleep_for(1ms);
2440 return voiceConnectionNew;
2442 return static_cast<discord_core_client_t*
>(
static_cast<value_type*
>(
this)->getDiscordCoreClient())->getVoiceConnection(
static_cast<value_type*
>(
this)->id);
2447 class DiscordCoreAPI_Dll
guild_data :
public flag_entity<guild_data>,
2448 public get_guild_image_url<guild_data>,
2453 jsonifier::vector<guild_scheduled_event_data> guildScheduledEvents{};
2455 jsonifier::vector<stage_instance_data> stageInstances{};
2456 jsonifier::vector<voice_state_data_light> voiceStates{};
2458 jsonifier::vector<presence_update_data> presences{};
2459 jsonifier::vector<jsonifier::string> features{};
2460 jsonifier::vector<guild_member_data> members{};
2466 jsonifier::vector<emoji_data> emoji{};
2467 uint32_t maxStageVideoChannelUsers{};
2469 uint32_t premiumSubscriptionCount{};
2470 jsonifier::string preferredLocale{};
2471 jsonifier::string discoverySplash{};
2472 uint32_t approximatePresenceCount{};
2477 uint32_t approximateMemberCount{};
2478 jsonifier::string vanityUrlCode{};
2479 bool premiumProgressBarEnabled{};
2480 uint32_t maxVideoChannelUsers{};
2481 jsonifier::string description{};
2482 permissions_parse permissions{};
2483 jsonifier::string discovery{};
2487 jsonifier::string splash{};
2488 jsonifier::string banner{};
2493 jsonifier::string name{};
2494 jsonifier::string icon{};
2495 uint32_t maxPresences{};
2496 uint32_t memberCount{};
2497 uint32_t maxMembers{};
2498 uint32_t afkTimeout{};
2500 bool widgetEnabled{};
2515 bool areWeConnected();
2528 public get_guild_image_url<guild_cache_data>,
2529 public connect_to_voice<guild_cache_data, discord_core_client, guild_members> {
2532 jsonifier::vector<snowflake> members{};
2533 jsonifier::vector<snowflake> emoji{};
2536 icon_hash discoverySplash{};
2537 jsonifier::string name{};
2538 uint32_t memberCount{};
2540 icon_hash discovery{};
2563 inline bool operator==(
const snowflake& other)
const {
2567 bool areWeConnected();
2576 jsonifier::string appPermissions{};
2577 jsonifier::string guildLocale{};
2579 jsonifier::string locale{};
2582 jsonifier::string token{};
2596 class partial_guild_data {
2655 inline web_hook_data() =
default;
2661 jsonifier::vector<guild_scheduled_event_data> guildScheduledEvents{};
2662 jsonifier::vector<auto_moderation_rule_data> autoModerationRules{};
2663 jsonifier::vector<audit_log_entry_data> auditLogEntries{};
2664 jsonifier::vector<integration_data> integrations{};
2665 jsonifier::vector<web_hook_data> webhooks{};
2677 template<
typename value_type>
friend struct jsonifier::core;
2678 template<
typename value_type>
friend struct event_data;
2683 friend class discord_core_internal::base_socket_agent;
2729 struct DiscordCoreAPI_Dll move_through_message_pages_data;
2738 friend DiscordCoreAPI_Dll move_through_message_pages_data moveThroughMessagePages(jsonifier::string_view userID,
input_event_data originalEvent, uint32_t currentPageIndex,
2739 const jsonifier::vector<embed_data>& messageEmbeds,
bool deleteAfter, uint32_t waitForMaxMs,
bool returnResult);
2773 jsonifier::string_view emojiName =
"",
snowflake emojiId =
snowflake{}, jsonifier::string_view url =
"");
2785 respond_to_input_event_data& addSelectMenu(
bool disabled, jsonifier::string_view customIdNew,
const jsonifier::vector<select_option_data>& options,
2786 jsonifier::string_view placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type,
2787 jsonifier::vector<channel_type> channelTypes = jsonifier::vector<channel_type>{});
2801 respond_to_input_event_data& addModal(jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew,
2802 jsonifier::string_view customIdNew,
bool required, uint64_t minLength, uint64_t maxLength,
text_input_style inputStyle, jsonifier::string_view label =
"",
2803 jsonifier::string_view placeholder =
"");
2846 unordered_map<jsonifier::string, jsonifier::string> theNameLocalizations);
2854 jsonifier::vector<application_command_option_choice_data> choices{};
2855 jsonifier::vector<action_row_data> components{};
2857 jsonifier::vector<embed_data> embeds{};
2858 jsonifier::string interactionToken{};
2860 jsonifier::vector<file> files{};
2861 interaction_type eventType{};
2862 jsonifier::string customId{};
2863 jsonifier::string content{};
2864 jsonifier::string title{};
2865 snowflake interactionId{};
2866 snowflake applicationId{};
2867 snowflake targetUserId{};
2868 snowflake channelId{};
2869 snowflake messageId{};
2877 template<
typename value_type>
friend struct jsonifier::core;
2888 jsonifier::string_view emojiName =
"",
snowflake emojiId =
snowflake{}, jsonifier::string_view url =
"");
2900 message_response_base& addSelectMenu(
bool disabled, jsonifier::string_view customIdNew, jsonifier::vector<select_option_data> options, jsonifier::string_view placeholder,
2901 uint64_t maxValues, uint64_t minValues, select_menu_type type, jsonifier::vector<channel_type> channelTypes = jsonifier::vector<channel_type>{});
2915 message_response_base& addModal(jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew,
2916 jsonifier::string_view customIdNew,
bool required, uint64_t minLength, uint64_t maxLength,
text_input_style inputStyle, jsonifier::string_view label =
"",
2917 jsonifier::string_view placeholder =
"");
2950 jsonifier::vector<action_row_data> components{};
2952 jsonifier::vector<embed_data> embeds{};
2953 jsonifier::vector<file> files{};
2954 jsonifier::string customId{};
2955 jsonifier::string content{};
2956 jsonifier::string title{};
2976 jsonifier::vector<application_command_permission_data> permissions{};
2993 uint64_t contentSize{};
2994 jsonifier::string urlPath{};
3004 friend class discord_core_internal::sound_cloud_request_builder;
3005 friend class discord_core_internal::you_tube_request_builder;
3006 friend class discord_core_internal::sound_cloud_api;
3007 friend class discord_core_internal::you_tube_api;
3010 jsonifier::vector<download_url> finalDownloadUrls{};
3012 jsonifier::string secondDownloadUrl{};
3013 jsonifier::string firstDownloadUrl{};
3014 jsonifier::string addedByUserName{};
3015 jsonifier::string thumbnailUrl{};
3016 jsonifier::string description{};
3017 jsonifier::string songTitle{};
3018 jsonifier::string duration{};
3019 jsonifier::string viewUrl{};
3020 jsonifier::string songId{};
3021 snowflake addedByUserId{};
3022 uint64_t contentLength{};
3039 inline bool areThereAnySongs() {
3049 inline bool sendNextSong() {
3087 inline void modifyQueue(uint64_t firstSongPosition, uint64_t secondSongPosition) {
3088 song tempSong =
songQueue.at(firstSongPosition);
3090 songQueue.at(secondSongPosition) = tempSong;
3101 struct serializer_value {
3102 unordered_map<jsonifier::string, json_string_value> values{};
3108 template<
typename value_type>
friend struct event_data;
3145 jsonifier::string getCommandName()
const;
3149 jsonifier::string getSubCommandName()
const;
3153 jsonifier::string getSubCommandGroupName()
const;
3157 serializer_value getCommandArguments()
const;
3166 jsonifier::string subCommandGroupName{};
3167 jsonifier::string subCommandName{};
3168 jsonifier::string commandName{};
3169 serializer_value optionsArgs{};
3182 jsonifier::string helpDescription{};
3183 jsonifier::string commandName{};
3193 struct DiscordCoreAPI_Dll move_through_message_pages_data {
3195 jsonifier::string buttonId{};
3196 uint32_t currentPageIndex{};
3199 DiscordCoreAPI_Dll move_through_message_pages_data moveThroughMessagePages(snowflake userID, input_event_data originalEvent, uint32_t currentPageIndex,
3200 const jsonifier::vector<embed_data>& messageEmbeds,
bool deleteAfter, uint32_t waitForMaxMs,
bool returnResult);
3205 unordered_set<jsonifier::string> excludedKeys{};
3206 jsonifier::vector<jsonifier::string> trace{};
3207 jsonifier::string resumeGatewayUrl{};
3208 application_data application{};
3209 jsonifier::string sessionId{};
3210 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 > 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.
unordered_set< jsonifier::string > excludedKeys
Keys to exclude at serialization time.
permission defaultMemberPermissions
Set of permissions represented as a bit set all.
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.
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.
An interface class for the channel_data related endpoints.
Command data, for functions executed by the command_controller.
For creating a deferred interaction response.
For creating an ephemeral follow up message_data.
For creating an ephemeral interaction response.
For creating a follow up message_data.
For creating an interaction response.
discord_core_client - the main class for this library.
A websocket client, for communication via a tcp-connection.
For editing a follow up message_data.
For editing an interaction response.
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.
An interface class for the guild_data related discord endpoints.
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.
message_interaction_data interaction
Message interaction data.
jsonifier::string editedTimestamp
The time at which it was edited.
guild_member_data member
The author's guild member data.pplication data.
snowflake guildId
The id of the guild the message was sent in.
channel_data thread
The thread_data that the message was sent in, if applicable.
message_reference_data messageReference
Message reference data.
jsonifier::vector< channel_mention_data > mentionChannels
Array of channel_data mention data.
message_type type
Message type.
jsonifier::string nonce
Nonce.
bool tts
Is it a text-to-speech message_data?
jsonifier::vector< jsonifier::string > mentionRoles
Jsonifier::vector of "mention roles" ids.
user_data author
The author's user_data data.
time_stamp timeStamp
The timeStamp of when the message was created.
jsonifier::vector< embed_data > embeds
Array of message embeds.
jsonifier::vector< user_data > mentions
Array of user_data data, for individual's that were mentioned.
snowflake webHookId
Web_hook id of the message_data, if applicable.
jsonifier::vector< attachment_data > attachments
Array of attachment data.
snowflake channelId
The channel_data it was sent in.
jsonifier::vector< action_row_data > components
Array of action row data.
snowflake applicationId
Application id.
jsonifier::string content
The message's content.
application_data application
A.
message_activity_data activity
Message activity data.
bool mentionEveryone
Does the message mention everyone?
jsonifier::vector< sticker_item_data > stickerItems
Array of message sticker_data item data.
Data structure representing a single message_data.
message_data_old referencedMessage
The referenced message, to reply to.
Message interaction data.
Message response base, for responding to messages.
An interface class for the message_data related discord endpoints.
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.
An interface class for the reaction_data related discord endpoints.
Data structure representing a single role_data.
An interface class for the role_data related discord endpoints.
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?
For sending a direct-message.
A class representing a snowflake identifier with various operations.
uint64_t id
The snowflake id.
A class representing the song apis.
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.
An interface class for the sticker_data related discord endpoints.
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.
An interface class for the thread_data related endpoints.
A class that extends time_stamp_base to provide additional functionality.
A smart pointer class that provides unique ownership semantics.
An interface class for the user_data related discord endpoints.
voice_connection class - represents the connection to a given voice channel_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.
@ 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.