From c0c8cf91cb78c1e1b65f787f53b0ff52d671c5c2 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 13 Aug 2023 15:23:51 +0300 Subject: [PATCH] Update Constants.cpp --- module/Library/Discord/Constants.cpp | 192 ++++++++++++++++----------- 1 file changed, 115 insertions(+), 77 deletions(-) diff --git a/module/Library/Discord/Constants.cpp b/module/Library/Discord/Constants.cpp index 9b9d74c9..ab006e4d 100644 --- a/module/Library/Discord/Constants.cpp +++ b/module/Library/Discord/Constants.cpp @@ -9,83 +9,83 @@ namespace SqMod { // ------------------------------------------------------------------------------------------------ const std::array< const char *, static_cast< size_t >(DpEventID::Max) > DpEventID::NAME{ - "VoiceStateUpdate", - "VoiceClientDisconnect", - "VoiceClientSpeaking", - "Log", - "GuildJoinRequestDelete", - "InteractionCreate", - "SlashCommand", - "ButtonClick", - "AutoComplete", - "SelectClick", - "MessageContextMenu", - "UserContextMenu", - "FormSubmit", - "GuildDelete", - "ChannelDelete", - "ChannelUpdate", - "Ready", - "MessageDelete", - "GuildMemberRemove", - "Resumed", - "GuildRoleCreate", - "TypingStart", - "MessageReactionAdd", - "GuildMembersChunk", - "MessageReactionRemove", - "GuildCreate", - "ChannelCreate", - "MessageReactionRemoveEmoji", - "MessageDeleteDulk", - "GuildRoleUpdate", - "GuildRoleDelete", - "ChannelPinsUpdate", - "MessageReactionRemoveAll", - "VoiceServerUpdate", - "GuildEmojisUpdate", - "GuildStickersUpdate", - "PresenceUpdate", - "WebhooksUpdate", - "AutomodRuleCreate", - "AutomodRuleUpdate", - "AutomodRuleDelete", - "AutomodRuleExecute", - "GuildMemberAdd", - "InviteDelete", - "GuildUpdate", - "GuildIntegrationsUpdate", - "GuildMemberUpdate", - "InviteCreate", - "MessageUpdate", - "UserUpdate", - "MessageCreate", - "GuildAuditLogEntryCreate", - "GuildBanAdd", - "GuildBanRemove", - "IntegrationCreate", - "IntegrationUpdate", - "IntegrationDelete", - "ThreadCreate", - "ThreadUpdate", - "ThreadDelete", - "ThreadListSync", - "ThreadMemberUpdate", - "ThreadMembersUpdate", - "GuildScheduledEventCreate", - "GuildScheduledEventUpdate", - "GuildScheduledEventDelete", - "GuildScheduledEventUserAdd", - "GuildScheduledEventUserRemove", - "VoiceBufferSend", - "VoiceUserTalking", - "VoiceReady", - "VoiceReceive", - "VoiceReceiveCombined", - "VoiceTrackMarker", - "StageInstanceCreate", - "StageInstanceUpdate", - "StageInstanceDelete", + "VoiceStateUpdate", + "VoiceClientDisconnect", + "VoiceClientSpeaking", + "Log", + "GuildJoinRequestDelete", + "InteractionCreate", + "SlashCommand", + "ButtonClick", + "AutoComplete", + "SelectClick", + "MessageContextMenu", + "UserContextMenu", + "FormSubmit", + "GuildDelete", + "ChannelDelete", + "ChannelUpdate", + "Ready", + "MessageDelete", + "GuildMemberRemove", + "Resumed", + "GuildRoleCreate", + "TypingStart", + "MessageReactionAdd", + "GuildMembersChunk", + "MessageReactionRemove", + "GuildCreate", + "ChannelCreate", + "MessageReactionRemoveEmoji", + "MessageDeleteDulk", + "GuildRoleUpdate", + "GuildRoleDelete", + "ChannelPinsUpdate", + "MessageReactionRemoveAll", + "VoiceServerUpdate", + "GuildEmojisUpdate", + "GuildStickersUpdate", + "PresenceUpdate", + "WebhooksUpdate", + "AutomodRuleCreate", + "AutomodRuleUpdate", + "AutomodRuleDelete", + "AutomodRuleExecute", + "GuildMemberAdd", + "InviteDelete", + "GuildUpdate", + "GuildIntegrationsUpdate", + "GuildMemberUpdate", + "InviteCreate", + "MessageUpdate", + "UserUpdate", + "MessageCreate", + "GuildAuditLogEntryCreate", + "GuildBanAdd", + "GuildBanRemove", + "IntegrationCreate", + "IntegrationUpdate", + "IntegrationDelete", + "ThreadCreate", + "ThreadUpdate", + "ThreadDelete", + "ThreadListSync", + "ThreadMemberUpdate", + "ThreadMembersUpdate", + "GuildScheduledEventCreate", + "GuildScheduledEventUpdate", + "GuildScheduledEventDelete", + "GuildScheduledEventUserAdd", + "GuildScheduledEventUserRemove", + "VoiceBufferSend", + "VoiceUserTalking", + "VoiceReady", + "VoiceReceive", + "VoiceReceiveCombined", + "VoiceTrackMarker", + "StageInstanceCreate", + "StageInstanceUpdate", + "StageInstanceDelete", }; // ------------------------------------------------------------------------------------------------ @@ -98,6 +98,14 @@ static const EnumElement g_DpLogLevelEnum[] = { {_SC("Critical"), static_cast< SQInteger >(dpp::ll_critical)}, }; +// ------------------------------------------------------------------------------------------------ +static const EnumElement g_DpImageTypeEnum[] = { + {_SC("PNG"), static_cast< SQInteger >(dpp::i_png)}, + {_SC("JPG"), static_cast< SQInteger >(dpp::i_jpg)}, + {_SC("GIF"), static_cast< SQInteger >(dpp::i_gif)}, + {_SC("WEBP"), static_cast< SQInteger >(dpp::i_webp)}, +}; + // ------------------------------------------------------------------------------------------------ static const EnumElement g_DpVoiceStateFlagsEnum[] = { {_SC("Deaf"), static_cast< SQInteger >(dpp::vs_deaf)}, @@ -250,9 +258,38 @@ static const EnumElement g_DpGuildMemberFlagsEnum[] = { {_SC("VoiceAction"), static_cast< SQInteger >(dpp::gm_voice_action)}, }; +// ------------------------------------------------------------------------------------------------ +static const EnumElement g_DpUserFlagsEnum[] = { + {_SC("Bot"), static_cast(dpp::u_bot)}, + {_SC("System"), static_cast(dpp::u_system)}, + {_SC("MfaEnabled"), static_cast(dpp::u_mfa_enabled)}, + {_SC("Verified"), static_cast(dpp::u_verified)}, + {_SC("NitroFull"), static_cast(dpp::u_nitro_full)}, + {_SC("NitroClassic"), static_cast(dpp::u_nitro_classic)}, + {_SC("DiscordEmployee"), static_cast(dpp::u_discord_employee)}, + {_SC("PartneredOwner"), static_cast(dpp::u_partnered_owner)}, + {_SC("HypesquadEvents"), static_cast(dpp::u_hypesquad_events)}, + {_SC("Bughunter1"), static_cast(dpp::u_bughunter_1)}, + {_SC("HouseBravery"), static_cast(dpp::u_house_bravery)}, + {_SC("HouseBrilliance"), static_cast(dpp::u_house_brilliance)}, + {_SC("HouseBalance"), static_cast(dpp::u_house_balance)}, + {_SC("EarlySupporter"), static_cast(dpp::u_early_supporter)}, + {_SC("TeamUser"), static_cast(dpp::u_team_user)}, + {_SC("Bughunter2"), static_cast(dpp::u_bughunter_2)}, + {_SC("VerifiedBot"), static_cast(dpp::u_verified_bot)}, + {_SC("VerifiedBotDev"), static_cast(dpp::u_verified_bot_dev)}, + {_SC("AnimatedIcon"), static_cast(dpp::u_animated_icon)}, + {_SC("CertifiedModerator"), static_cast(dpp::u_certified_moderator)}, + {_SC("BotHttpInteractions"), static_cast(dpp::u_bot_http_interactions)}, + {_SC("NitroBasic"), static_cast(dpp::u_nitro_basic)}, + {_SC("ActiveDeveloper"), static_cast(dpp::u_active_developer)}, + {_SC("AnimatedBanner"), static_cast(dpp::u_animated_banner)}, +}; + // ------------------------------------------------------------------------------------------------ static const EnumElements g_EnumList[] = { {_SC("SqDiscordLogLevel"), g_DpLogLevelEnum}, + {_SC("SqDiscordImageType"), g_DpImageTypeEnum}, {_SC("SqDiscordVoiceStateFlags"), g_DpVoiceStateFlagsEnum}, {_SC("SqDiscordEmojiFlags"), g_DpEmojiFlagsEnum}, {_SC("SqDiscordPresenceFlags"), g_DpPresenceFlagsEnum}, @@ -263,6 +300,7 @@ static const EnumElements g_EnumList[] = { {_SC("SqDiscordGuildFlags"), g_DpGuildFlagsEnum}, {_SC("SqDiscordGuildFlagsExtra"), g_DpGuildFlagsExtraEnum}, {_SC("SqDiscordGuildMemberFlags"), g_DpGuildMemberFlagsEnum}, + {_SC("SqDiscordUserFlags"), g_DpUserFlagsEnum}, }; // ------------------------------------------------------------------------------------------------