seyfert 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -190
- package/README.md +18 -10
- package/lib/api/Router.js +2 -2
- package/lib/api/Routes/applications.d.ts +23 -1
- package/lib/api/Routes/channels.d.ts +1 -1
- package/lib/api/Routes/gateway.d.ts +1 -1
- package/lib/api/Routes/guilds.d.ts +5 -2
- package/lib/api/Routes/interactions.d.ts +8 -2
- package/lib/api/Routes/invites.d.ts +1 -1
- package/lib/api/Routes/skus.d.ts +11 -0
- package/lib/api/Routes/skus.js +2 -0
- package/lib/api/Routes/stage-instances.d.ts +1 -1
- package/lib/api/Routes/stickers.d.ts +2 -2
- package/lib/api/Routes/users.d.ts +1 -1
- package/lib/api/Routes/voice.d.ts +1 -1
- package/lib/api/Routes/webhooks.d.ts +2 -2
- package/lib/api/api.d.ts +3 -3
- package/lib/api/api.js +15 -25
- package/lib/api/bucket.d.ts +0 -1
- package/lib/api/shared.d.ts +1 -2
- package/lib/api/utils/constants.d.ts +2 -5
- package/lib/api/utils/constants.js +3 -7
- package/lib/api/utils/utils.d.ts +1 -2
- package/lib/api/utils/utils.js +2 -3
- package/lib/builders/ActionRow.d.ts +1 -1
- package/lib/builders/ActionRow.js +3 -3
- package/lib/builders/Attachment.d.ts +3 -4
- package/lib/builders/Attachment.js +24 -25
- package/lib/builders/Base.d.ts +2 -2
- package/lib/builders/Base.js +1 -1
- package/lib/builders/Button.d.ts +7 -7
- package/lib/builders/Button.js +11 -9
- package/lib/builders/Embed.d.ts +1 -1
- package/lib/builders/Modal.d.ts +1 -1
- package/lib/builders/Modal.js +2 -2
- package/lib/builders/Poll.d.ts +2 -2
- package/lib/builders/Poll.js +5 -6
- package/lib/builders/SelectMenu.d.ts +1 -1
- package/lib/builders/SelectMenu.js +17 -18
- package/lib/builders/index.d.ts +1 -1
- package/lib/builders/index.js +10 -11
- package/lib/cache/adapters/default.d.ts +16 -9
- package/lib/cache/adapters/default.js +42 -31
- package/lib/cache/adapters/index.d.ts +0 -1
- package/lib/cache/adapters/index.js +0 -1
- package/lib/cache/adapters/limited.d.ts +17 -12
- package/lib/cache/adapters/limited.js +80 -36
- package/lib/cache/adapters/types.d.ts +6 -7
- package/lib/cache/adapters/workeradapter.d.ts +6 -6
- package/lib/cache/adapters/workeradapter.js +13 -0
- package/lib/cache/index.d.ts +20 -8
- package/lib/cache/index.js +328 -22
- package/lib/cache/resources/bans.d.ts +9 -6
- package/lib/cache/resources/bans.js +13 -4
- package/lib/cache/resources/channels.d.ts +6 -4
- package/lib/cache/resources/channels.js +13 -7
- package/lib/cache/resources/default/base.d.ts +7 -7
- package/lib/cache/resources/default/base.js +2 -2
- package/lib/cache/resources/default/guild-based.d.ts +6 -6
- package/lib/cache/resources/default/guild-based.js +6 -6
- package/lib/cache/resources/default/guild-related.d.ts +7 -7
- package/lib/cache/resources/default/guild-related.js +10 -8
- package/lib/cache/resources/emojis.d.ts +15 -6
- package/lib/cache/resources/emojis.js +13 -4
- package/lib/cache/resources/guilds.d.ts +9 -6
- package/lib/cache/resources/guilds.js +27 -6
- package/lib/cache/resources/members.d.ts +9 -6
- package/lib/cache/resources/members.js +22 -6
- package/lib/cache/resources/messages.d.ts +11 -7
- package/lib/cache/resources/messages.js +19 -7
- package/lib/cache/resources/overwrites.d.ts +11 -2
- package/lib/cache/resources/overwrites.js +9 -0
- package/lib/cache/resources/presence.d.ts +3 -2
- package/lib/cache/resources/roles.d.ts +9 -6
- package/lib/cache/resources/roles.js +13 -4
- package/lib/cache/resources/stage-instances.d.ts +2 -2
- package/lib/cache/resources/stickers.d.ts +9 -6
- package/lib/cache/resources/stickers.js +13 -4
- package/lib/cache/resources/threads.d.ts +9 -6
- package/lib/cache/resources/threads.js +13 -4
- package/lib/cache/resources/users.d.ts +9 -6
- package/lib/cache/resources/users.js +13 -4
- package/lib/cache/resources/voice-states.d.ts +11 -8
- package/lib/cache/resources/voice-states.js +15 -4
- package/lib/client/base.d.ts +29 -21
- package/lib/client/base.js +64 -57
- package/lib/client/client.d.ts +11 -16
- package/lib/client/client.js +51 -37
- package/lib/client/collectors.d.ts +10 -10
- package/lib/client/collectors.js +26 -1
- package/lib/client/httpclient.d.ts +8 -13
- package/lib/client/httpclient.js +27 -218
- package/lib/client/index.d.ts +1 -0
- package/lib/client/index.js +1 -0
- package/lib/client/transformers.d.ts +68 -0
- package/lib/client/transformers.js +99 -0
- package/lib/client/types.d.ts +5 -0
- package/lib/client/types.js +2 -0
- package/lib/client/workerclient.d.ts +16 -15
- package/lib/client/workerclient.js +130 -72
- package/lib/commands/applications/chat.d.ts +35 -34
- package/lib/commands/applications/chat.js +5 -9
- package/lib/commands/applications/chatcontext.d.ts +17 -17
- package/lib/commands/applications/chatcontext.js +5 -5
- package/lib/commands/applications/entryPoint.d.ts +46 -0
- package/lib/commands/applications/entryPoint.js +56 -0
- package/lib/commands/applications/entrycontext.d.ts +40 -0
- package/lib/commands/applications/entrycontext.js +85 -0
- package/lib/commands/applications/menu.d.ts +2 -3
- package/lib/commands/applications/menu.js +2 -5
- package/lib/commands/applications/menucontext.d.ts +14 -13
- package/lib/commands/applications/menucontext.js +9 -9
- package/lib/commands/applications/options.d.ts +4 -3
- package/lib/commands/applications/options.js +20 -21
- package/lib/commands/applications/shared.d.ts +3 -1
- package/lib/commands/decorators.d.ts +47 -35
- package/lib/commands/decorators.js +20 -18
- package/lib/commands/handle.d.ts +65 -0
- package/lib/commands/handle.js +727 -0
- package/lib/commands/handler.d.ts +29 -18
- package/lib/commands/handler.js +295 -164
- package/lib/commands/index.d.ts +2 -0
- package/lib/commands/index.js +2 -0
- package/lib/commands/optionresolver.d.ts +13 -13
- package/lib/commands/optionresolver.js +24 -29
- package/lib/common/bot/watcher.d.ts +4 -33
- package/lib/common/bot/watcher.js +0 -109
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.js +1 -0
- package/lib/common/it/colors.js +48 -49
- package/lib/common/it/formatter.d.ts +32 -0
- package/lib/common/it/formatter.js +42 -0
- package/lib/common/it/logger.d.ts +0 -1
- package/lib/common/it/logger.js +3 -3
- package/lib/common/it/utils.d.ts +24 -4
- package/lib/common/it/utils.js +88 -17
- package/lib/common/shorters/application.d.ts +56 -0
- package/lib/common/shorters/application.js +81 -0
- package/lib/common/shorters/bans.d.ts +4 -5
- package/lib/common/shorters/bans.js +3 -3
- package/lib/common/shorters/channels.d.ts +7 -6
- package/lib/common/shorters/channels.js +19 -15
- package/lib/common/shorters/emojis.d.ts +5 -6
- package/lib/common/shorters/emojis.js +5 -5
- package/lib/common/shorters/guilds.d.ts +18 -16
- package/lib/common/shorters/guilds.js +31 -26
- package/lib/common/shorters/interaction.d.ts +7 -7
- package/lib/common/shorters/interaction.js +3 -2
- package/lib/common/shorters/members.d.ts +29 -12
- package/lib/common/shorters/members.js +55 -16
- package/lib/common/shorters/messages.d.ts +7 -8
- package/lib/common/shorters/messages.js +8 -7
- package/lib/common/shorters/reactions.d.ts +3 -3
- package/lib/common/shorters/reactions.js +11 -11
- package/lib/common/shorters/roles.d.ts +9 -7
- package/lib/common/shorters/roles.js +26 -7
- package/lib/common/shorters/templates.d.ts +7 -8
- package/lib/common/shorters/templates.js +7 -7
- package/lib/common/shorters/threads.d.ts +6 -7
- package/lib/common/shorters/threads.js +6 -9
- package/lib/common/shorters/users.d.ts +4 -4
- package/lib/common/shorters/users.js +8 -4
- package/lib/common/shorters/webhook.d.ts +10 -10
- package/lib/common/shorters/webhook.js +10 -9
- package/lib/common/types/resolvables.d.ts +2 -2
- package/lib/common/types/util.d.ts +4 -2
- package/lib/common/types/write.d.ts +3 -3
- package/lib/components/ActionRow.d.ts +1 -1
- package/lib/components/BaseComponent.d.ts +1 -1
- package/lib/components/BaseComponent.js +1 -1
- package/lib/components/BaseSelectMenuComponent.d.ts +1 -1
- package/lib/components/ButtonComponent.d.ts +17 -7
- package/lib/components/ButtonComponent.js +19 -2
- package/lib/components/ChannelSelectMenuComponent.d.ts +3 -3
- package/lib/components/MentionableSelectMenuComponent.d.ts +2 -2
- package/lib/components/RoleSelectMenuComponent.d.ts +2 -2
- package/lib/components/StringSelectMenuComponent.d.ts +2 -2
- package/lib/components/TextInputComponent.d.ts +2 -2
- package/lib/components/UserSelectMenuComponent.d.ts +2 -2
- package/lib/components/componentcommand.js +2 -2
- package/lib/components/componentcontext.d.ts +10 -9
- package/lib/components/componentcontext.js +8 -8
- package/lib/components/handler.d.ts +15 -14
- package/lib/components/handler.js +89 -93
- package/lib/components/index.d.ts +3 -3
- package/lib/components/index.js +12 -10
- package/lib/components/modalcontext.d.ts +12 -11
- package/lib/components/modalcontext.js +2 -2
- package/lib/deps/mixer.d.ts +8 -0
- package/lib/deps/mixer.js +71 -0
- package/lib/events/handler.d.ts +35 -13
- package/lib/events/handler.js +57 -24
- package/lib/events/hooks/application_command.d.ts +2 -2
- package/lib/events/hooks/auto_moderation.d.ts +6 -7
- package/lib/events/hooks/auto_moderation.js +4 -4
- package/lib/events/hooks/channel.d.ts +2 -2
- package/lib/events/hooks/channel.js +4 -7
- package/lib/events/hooks/custom.d.ts +4 -3
- package/lib/events/hooks/custom.js +5 -1
- package/lib/events/hooks/dispatch.d.ts +3 -4
- package/lib/events/hooks/dispatch.js +2 -2
- package/lib/events/hooks/entitlement.d.ts +5 -37
- package/lib/events/hooks/entitlement.js +7 -7
- package/lib/events/hooks/guild.d.ts +125 -125
- package/lib/events/hooks/guild.js +13 -15
- package/lib/events/hooks/integration.d.ts +27 -28
- package/lib/events/hooks/integration.js +3 -3
- package/lib/events/hooks/interactions.d.ts +2 -2
- package/lib/events/hooks/invite.d.ts +18 -17
- package/lib/events/hooks/message.d.ts +69 -54
- package/lib/events/hooks/message.js +4 -8
- package/lib/events/hooks/presence.d.ts +17 -16
- package/lib/events/hooks/stage.d.ts +4 -4
- package/lib/events/hooks/subscriptions.d.ts +35 -0
- package/lib/events/hooks/subscriptions.js +16 -0
- package/lib/events/hooks/thread.d.ts +132 -63
- package/lib/events/hooks/thread.js +4 -4
- package/lib/events/hooks/typing.d.ts +28 -6
- package/lib/events/hooks/typing.js +2 -2
- package/lib/events/hooks/user.d.ts +3 -3
- package/lib/events/hooks/user.js +2 -2
- package/lib/events/hooks/voice.d.ts +28 -3
- package/lib/events/hooks/voice.js +8 -4
- package/lib/events/hooks/webhook.d.ts +1 -1
- package/lib/index.d.ts +5 -14
- package/lib/index.js +7 -12
- package/lib/langs/handler.d.ts +14 -10
- package/lib/langs/handler.js +40 -9
- package/lib/structures/AutoModerationRule.d.ts +4 -4
- package/lib/structures/AutoModerationRule.js +1 -2
- package/lib/structures/ClientUser.d.ts +1 -1
- package/lib/structures/Entitlement.d.ts +10 -0
- package/lib/structures/Entitlement.js +16 -0
- package/lib/structures/Guild.d.ts +33 -34
- package/lib/structures/Guild.js +5 -2
- package/lib/structures/GuildBan.d.ts +6 -6
- package/lib/structures/GuildBan.js +2 -1
- package/lib/structures/GuildEmoji.d.ts +4 -4
- package/lib/structures/GuildEmoji.js +3 -2
- package/lib/structures/GuildMember.d.ts +20 -17
- package/lib/structures/GuildMember.js +18 -8
- package/lib/structures/GuildPreview.d.ts +1 -1
- package/lib/structures/GuildRole.d.ts +5 -3
- package/lib/structures/GuildRole.js +8 -1
- package/lib/structures/GuildTemplate.d.ts +2 -2
- package/lib/structures/GuildTemplate.js +1 -1
- package/lib/structures/Interaction.d.ts +76 -39
- package/lib/structures/Interaction.js +179 -94
- package/lib/structures/Message.d.ts +29 -33
- package/lib/structures/Message.js +8 -12
- package/lib/structures/Poll.d.ts +4 -3
- package/lib/structures/Poll.js +6 -2
- package/lib/structures/Sticker.d.ts +7 -7
- package/lib/structures/Sticker.js +7 -7
- package/lib/structures/User.d.ts +5 -4
- package/lib/structures/User.js +2 -1
- package/lib/structures/VoiceState.d.ts +15 -11
- package/lib/structures/VoiceState.js +35 -17
- package/lib/structures/Webhook.d.ts +6 -7
- package/lib/structures/Webhook.js +6 -7
- package/lib/structures/channels.d.ts +11 -10
- package/lib/structures/channels.js +70 -65
- package/lib/structures/extra/BaseGuild.d.ts +12 -2
- package/lib/structures/extra/BaseGuild.js +30 -3
- package/lib/structures/extra/BitField.d.ts +1 -1
- package/lib/structures/extra/BitField.js +3 -2
- package/lib/structures/extra/DiscordBase.js +2 -2
- package/lib/structures/extra/Permissions.d.ts +3 -1
- package/lib/structures/extra/Permissions.js +8 -3
- package/lib/types/gateway.d.ts +1554 -0
- package/lib/types/gateway.js +4 -0
- package/lib/types/index.d.ts +9 -1
- package/lib/types/index.js +28 -1
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.d.ts +5 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/base.d.ts +22 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/base.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/boolean.d.ts +4 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/boolean.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/channel.d.ts +7 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/channel.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/integer.d.ts +17 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/integer.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/mentionable.d.ts +5 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/mentionable.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/number.d.ts +17 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/number.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/role.d.ts +5 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/role.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.d.ts +25 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.js +20 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/string.d.ts +17 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/string.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommand.d.ts +11 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommand.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts +11 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommandGroup.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/user.d.ts +5 -0
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/user.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +65 -0
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.js +29 -0
- package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.d.ts +65 -0
- package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/internals.d.ts +8 -0
- package/lib/types/payloads/_interactions/_applicationCommands/internals.js +2 -0
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.d.ts +54 -0
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.js +20 -0
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +188 -0
- package/lib/types/payloads/_interactions/applicationCommands.js +88 -0
- package/lib/types/payloads/_interactions/autocomplete.d.ts +10 -0
- package/lib/types/payloads/_interactions/autocomplete.js +2 -0
- package/lib/types/payloads/_interactions/base.d.ts +197 -0
- package/lib/types/payloads/_interactions/base.js +2 -0
- package/lib/types/payloads/_interactions/messageComponents.d.ts +41 -0
- package/lib/types/payloads/_interactions/messageComponents.js +2 -0
- package/lib/types/payloads/_interactions/modalSubmit.d.ts +35 -0
- package/lib/types/payloads/_interactions/modalSubmit.js +2 -0
- package/lib/types/payloads/_interactions/ping.d.ts +3 -0
- package/lib/types/payloads/_interactions/ping.js +2 -0
- package/lib/types/payloads/_interactions/responses.d.ts +184 -0
- package/lib/types/payloads/_interactions/responses.js +58 -0
- package/lib/types/payloads/application.d.ts +292 -0
- package/lib/types/payloads/application.js +117 -0
- package/lib/types/payloads/auditLog.d.ts +644 -0
- package/lib/types/payloads/auditLog.js +80 -0
- package/lib/types/payloads/autoModeration.d.ts +219 -0
- package/lib/types/payloads/autoModeration.js +87 -0
- package/lib/types/payloads/channel.d.ts +1748 -0
- package/lib/types/payloads/channel.js +376 -0
- package/lib/types/payloads/emoji.d.ts +48 -0
- package/lib/types/payloads/emoji.js +5 -0
- package/lib/types/payloads/gateway.d.ts +373 -0
- package/lib/types/payloads/gateway.js +82 -0
- package/lib/types/payloads/guild.d.ts +1060 -0
- package/lib/types/payloads/guild.js +324 -0
- package/lib/types/payloads/guildScheduledEvent.d.ts +138 -0
- package/lib/types/payloads/guildScheduledEvent.js +32 -0
- package/lib/types/payloads/index.d.ts +64 -0
- package/lib/types/payloads/index.js +37 -0
- package/lib/types/payloads/interactions.d.ts +24 -0
- package/lib/types/payloads/interactions.js +23 -0
- package/lib/types/payloads/invite.d.ts +121 -0
- package/lib/types/payloads/invite.js +23 -0
- package/lib/types/payloads/monetization.d.ts +178 -0
- package/lib/types/payloads/monetization.js +88 -0
- package/lib/types/payloads/oauth2.d.ts +131 -0
- package/lib/types/payloads/oauth2.js +135 -0
- package/lib/types/payloads/permissions.d.ts +97 -0
- package/lib/types/payloads/permissions.js +16 -0
- package/lib/types/payloads/poll.d.ts +104 -0
- package/lib/types/payloads/poll.js +16 -0
- package/lib/types/payloads/stageInstance.d.ts +77 -0
- package/lib/types/payloads/stageInstance.js +19 -0
- package/lib/types/payloads/sticker.d.ts +123 -0
- package/lib/types/payloads/sticker.js +30 -0
- package/lib/types/payloads/teams.d.ts +78 -0
- package/lib/types/payloads/teams.js +23 -0
- package/lib/types/payloads/template.d.ts +62 -0
- package/lib/types/payloads/template.js +5 -0
- package/lib/types/payloads/user.d.ts +337 -0
- package/lib/types/payloads/user.js +167 -0
- package/lib/types/payloads/voice.d.ts +89 -0
- package/lib/types/payloads/voice.js +5 -0
- package/lib/types/payloads/webhook.d.ts +76 -0
- package/lib/types/payloads/webhook.js +21 -0
- package/lib/types/rest/application.d.ts +57 -0
- package/lib/types/rest/application.js +2 -0
- package/lib/types/rest/auditLog.d.ts +30 -0
- package/lib/types/rest/auditLog.js +2 -0
- package/lib/types/rest/autoModeration.d.ts +66 -0
- package/lib/types/rest/autoModeration.js +2 -0
- package/lib/types/rest/channel.d.ts +699 -0
- package/lib/types/rest/channel.js +11 -0
- package/lib/types/rest/emoji.d.ts +54 -0
- package/lib/types/rest/emoji.js +2 -0
- package/lib/types/rest/gateway.d.ts +9 -0
- package/lib/types/rest/gateway.js +2 -0
- package/lib/types/rest/guild.d.ts +865 -0
- package/lib/types/rest/guild.js +2 -0
- package/lib/types/rest/guildScheduledEvent.d.ts +126 -0
- package/lib/types/rest/guildScheduledEvent.js +2 -0
- package/lib/types/rest/index.d.ts +296 -0
- package/lib/types/rest/index.js +292 -0
- package/lib/types/rest/interactions.d.ts +216 -0
- package/lib/types/rest/interactions.js +2 -0
- package/lib/types/rest/invite.d.ts +24 -0
- package/lib/types/rest/invite.js +2 -0
- package/lib/types/rest/monetization.d.ts +103 -0
- package/lib/types/rest/monetization.js +11 -0
- package/lib/types/rest/oauth2.d.ts +172 -0
- package/lib/types/rest/oauth2.js +2 -0
- package/lib/types/rest/poll.d.ts +44 -0
- package/lib/types/rest/poll.js +2 -0
- package/lib/types/rest/stageInstance.d.ts +58 -0
- package/lib/types/rest/stageInstance.js +2 -0
- package/lib/types/rest/sticker.d.ts +77 -0
- package/lib/types/rest/sticker.js +2 -0
- package/lib/types/rest/template.d.ts +62 -0
- package/lib/types/rest/template.js +2 -0
- package/lib/types/rest/user.d.ts +120 -0
- package/lib/types/rest/user.js +2 -0
- package/lib/types/rest/voice.d.ts +17 -0
- package/lib/types/rest/voice.js +2 -0
- package/lib/types/rest/webhook.d.ts +250 -0
- package/lib/types/rest/webhook.js +2 -0
- package/lib/types/utils/index.d.ts +808 -0
- package/lib/types/utils/index.js +810 -0
- package/lib/websocket/SharedTypes.d.ts +12 -5
- package/lib/websocket/SharedTypes.js +1 -1
- package/lib/websocket/constants/index.d.ts +3 -3
- package/lib/websocket/constants/index.js +11 -1
- package/lib/websocket/discord/basesocket.d.ts +7 -7
- package/lib/websocket/discord/basesocket.js +34 -22
- package/lib/websocket/discord/events/memberUpdate.d.ts +1 -6
- package/lib/websocket/discord/events/memberUpdate.js +2 -1
- package/lib/websocket/discord/events/presenceUpdate.d.ts +5 -18
- package/lib/websocket/discord/events/presenceUpdate.js +5 -6
- package/lib/websocket/discord/shard.d.ts +9 -8
- package/lib/websocket/discord/shard.js +83 -57
- package/lib/websocket/discord/sharder.d.ts +6 -5
- package/lib/websocket/discord/sharder.js +70 -11
- package/lib/websocket/discord/shared.d.ts +34 -6
- package/lib/websocket/discord/socket/custom.d.ts +52 -0
- package/lib/websocket/discord/socket/custom.js +300 -0
- package/lib/websocket/discord/worker.d.ts +6 -10
- package/lib/websocket/discord/workermanager.d.ts +10 -16
- package/lib/websocket/discord/workermanager.js +63 -50
- package/lib/websocket/structures/index.d.ts +0 -1
- package/lib/websocket/structures/index.js +1 -1
- package/lib/websocket/structures/timeout.d.ts +0 -1
- package/package.json +70 -74
- package/lib/cache/adapters/redis.d.ts +0 -37
- package/lib/cache/adapters/redis.js +0 -218
- package/lib/client/oninteractioncreate.d.ts +0 -4
- package/lib/client/oninteractioncreate.js +0 -198
- package/lib/client/onmessagecreate.d.ts +0 -13
- package/lib/client/onmessagecreate.js +0 -410
- package/lib/structures/extra/functions.d.ts +0 -12
- package/lib/structures/extra/functions.js +0 -70
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types extracted from https://discord.com/developers/docs/resources/audit-log
|
|
3
|
+
*/
|
|
4
|
+
import type { Snowflake } from '..';
|
|
5
|
+
import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration';
|
|
6
|
+
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
|
|
7
|
+
import type { APIGuildIntegration, APIGuildIntegrationType, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
|
|
8
|
+
import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
|
|
9
|
+
import type { APIApplicationCommand } from './interactions';
|
|
10
|
+
import type { APIRole } from './permissions';
|
|
11
|
+
import type { StageInstancePrivacyLevel } from './stageInstance';
|
|
12
|
+
import type { StickerFormatType } from './sticker';
|
|
13
|
+
import type { APIUser } from './user';
|
|
14
|
+
import type { APIWebhook } from './webhook';
|
|
15
|
+
/**
|
|
16
|
+
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
|
17
|
+
*/
|
|
18
|
+
export interface APIAuditLog {
|
|
19
|
+
/**
|
|
20
|
+
* List of application commands found in the audit log
|
|
21
|
+
*
|
|
22
|
+
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
|
23
|
+
*/
|
|
24
|
+
application_commands: APIApplicationCommand[];
|
|
25
|
+
/**
|
|
26
|
+
* Webhooks found in the audit log
|
|
27
|
+
*
|
|
28
|
+
* See https://discord.com/developers/docs/resources/webhook#webhook-object
|
|
29
|
+
*/
|
|
30
|
+
webhooks: APIWebhook[];
|
|
31
|
+
/**
|
|
32
|
+
* Users found in the audit log
|
|
33
|
+
*
|
|
34
|
+
* See https://discord.com/developers/docs/resources/user#user-object
|
|
35
|
+
*/
|
|
36
|
+
users: APIUser[];
|
|
37
|
+
/**
|
|
38
|
+
* Audit log entries
|
|
39
|
+
*
|
|
40
|
+
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
|
|
41
|
+
*/
|
|
42
|
+
audit_log_entries: APIAuditLogEntry[];
|
|
43
|
+
/**
|
|
44
|
+
* List of auto moderation rules referenced in the audit log
|
|
45
|
+
*
|
|
46
|
+
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
|
|
47
|
+
*/
|
|
48
|
+
auto_moderation_rules: APIAutoModerationRule[];
|
|
49
|
+
/**
|
|
50
|
+
* Partial integration objects
|
|
51
|
+
*
|
|
52
|
+
* See https://discord.com/developers/docs/resources/guild#integration-object
|
|
53
|
+
*/
|
|
54
|
+
integrations: APIGuildIntegration[];
|
|
55
|
+
/**
|
|
56
|
+
* Threads found in the audit log
|
|
57
|
+
*
|
|
58
|
+
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
|
|
59
|
+
*
|
|
60
|
+
* See https://discord.com/developers/docs/resources/channel#channel-object
|
|
61
|
+
*/
|
|
62
|
+
threads: APIChannel[];
|
|
63
|
+
/**
|
|
64
|
+
* The guild scheduled events in the audit log
|
|
65
|
+
*
|
|
66
|
+
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
|
|
67
|
+
*/
|
|
68
|
+
guild_scheduled_events: APIGuildScheduledEvent[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
|
|
72
|
+
*/
|
|
73
|
+
export interface APIAuditLogEntry {
|
|
74
|
+
/**
|
|
75
|
+
* ID of the affected entity (webhook, user, role, etc.)
|
|
76
|
+
*/
|
|
77
|
+
target_id: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Changes made to the `target_id`
|
|
80
|
+
*
|
|
81
|
+
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
|
|
82
|
+
*/
|
|
83
|
+
changes?: APIAuditLogChange[];
|
|
84
|
+
/**
|
|
85
|
+
* The user who made the changes
|
|
86
|
+
*
|
|
87
|
+
* This can be `null` in some cases (webhooks deleting themselves by using their own token, for example)
|
|
88
|
+
*/
|
|
89
|
+
user_id: Snowflake | null;
|
|
90
|
+
/**
|
|
91
|
+
* ID of the entry
|
|
92
|
+
*/
|
|
93
|
+
id: Snowflake;
|
|
94
|
+
/**
|
|
95
|
+
* Type of action that occurred
|
|
96
|
+
*
|
|
97
|
+
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
|
98
|
+
*/
|
|
99
|
+
action_type: AuditLogEvent;
|
|
100
|
+
/**
|
|
101
|
+
* Additional info for certain action types
|
|
102
|
+
*
|
|
103
|
+
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
|
104
|
+
*/
|
|
105
|
+
options?: APIAuditLogOptions;
|
|
106
|
+
/**
|
|
107
|
+
* The reason for the change (0-512 characters)
|
|
108
|
+
*/
|
|
109
|
+
reason?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
|
113
|
+
*/
|
|
114
|
+
export declare enum AuditLogEvent {
|
|
115
|
+
GuildUpdate = 1,
|
|
116
|
+
ChannelCreate = 10,
|
|
117
|
+
ChannelUpdate = 11,
|
|
118
|
+
ChannelDelete = 12,
|
|
119
|
+
ChannelOverwriteCreate = 13,
|
|
120
|
+
ChannelOverwriteUpdate = 14,
|
|
121
|
+
ChannelOverwriteDelete = 15,
|
|
122
|
+
MemberKick = 20,
|
|
123
|
+
MemberPrune = 21,
|
|
124
|
+
MemberBanAdd = 22,
|
|
125
|
+
MemberBanRemove = 23,
|
|
126
|
+
MemberUpdate = 24,
|
|
127
|
+
MemberRoleUpdate = 25,
|
|
128
|
+
MemberMove = 26,
|
|
129
|
+
MemberDisconnect = 27,
|
|
130
|
+
BotAdd = 28,
|
|
131
|
+
RoleCreate = 30,
|
|
132
|
+
RoleUpdate = 31,
|
|
133
|
+
RoleDelete = 32,
|
|
134
|
+
InviteCreate = 40,
|
|
135
|
+
InviteUpdate = 41,
|
|
136
|
+
InviteDelete = 42,
|
|
137
|
+
WebhookCreate = 50,
|
|
138
|
+
WebhookUpdate = 51,
|
|
139
|
+
WebhookDelete = 52,
|
|
140
|
+
EmojiCreate = 60,
|
|
141
|
+
EmojiUpdate = 61,
|
|
142
|
+
EmojiDelete = 62,
|
|
143
|
+
MessageDelete = 72,
|
|
144
|
+
MessageBulkDelete = 73,
|
|
145
|
+
MessagePin = 74,
|
|
146
|
+
MessageUnpin = 75,
|
|
147
|
+
IntegrationCreate = 80,
|
|
148
|
+
IntegrationUpdate = 81,
|
|
149
|
+
IntegrationDelete = 82,
|
|
150
|
+
StageInstanceCreate = 83,
|
|
151
|
+
StageInstanceUpdate = 84,
|
|
152
|
+
StageInstanceDelete = 85,
|
|
153
|
+
StickerCreate = 90,
|
|
154
|
+
StickerUpdate = 91,
|
|
155
|
+
StickerDelete = 92,
|
|
156
|
+
GuildScheduledEventCreate = 100,
|
|
157
|
+
GuildScheduledEventUpdate = 101,
|
|
158
|
+
GuildScheduledEventDelete = 102,
|
|
159
|
+
ThreadCreate = 110,
|
|
160
|
+
ThreadUpdate = 111,
|
|
161
|
+
ThreadDelete = 112,
|
|
162
|
+
ApplicationCommandPermissionUpdate = 121,
|
|
163
|
+
AutoModerationRuleCreate = 140,
|
|
164
|
+
AutoModerationRuleUpdate = 141,
|
|
165
|
+
AutoModerationRuleDelete = 142,
|
|
166
|
+
AutoModerationBlockMessage = 143,
|
|
167
|
+
AutoModerationFlagToChannel = 144,
|
|
168
|
+
AutoModerationUserCommunicationDisabled = 145,
|
|
169
|
+
CreatorMonetizationRequestCreated = 150,
|
|
170
|
+
CreatorMonetizationTermsAccepted = 151,
|
|
171
|
+
OnboardingPromptCreate = 163,
|
|
172
|
+
OnboardingPromptUpdate = 164,
|
|
173
|
+
OnboardingPromptDelete = 165,
|
|
174
|
+
OnboardingCreate = 166,
|
|
175
|
+
OnboardingUpdate = 167,
|
|
176
|
+
HomeSettingsCreate = 190,
|
|
177
|
+
HomeSettingsUpdate = 191
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
|
181
|
+
*/
|
|
182
|
+
export interface APIAuditLogOptions {
|
|
183
|
+
/**
|
|
184
|
+
* Name of the Auto Moderation rule that was triggered
|
|
185
|
+
*
|
|
186
|
+
* Present from:
|
|
187
|
+
* - AUTO_MODERATION_BLOCK_MESSAGE
|
|
188
|
+
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
|
189
|
+
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
|
190
|
+
*/
|
|
191
|
+
auto_moderation_rule_name?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Trigger type of the Auto Moderation rule that was triggered
|
|
194
|
+
*
|
|
195
|
+
* Present from:
|
|
196
|
+
* - AUTO_MODERATION_BLOCK_MESSAGE
|
|
197
|
+
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
|
198
|
+
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
|
199
|
+
*/
|
|
200
|
+
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
|
|
201
|
+
/**
|
|
202
|
+
* Number of days after which inactive members were kicked
|
|
203
|
+
*
|
|
204
|
+
* Present from:
|
|
205
|
+
* - MEMBER_PRUNE
|
|
206
|
+
*/
|
|
207
|
+
delete_member_days?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Number of members removed by the prune
|
|
210
|
+
*
|
|
211
|
+
* Present from:
|
|
212
|
+
* - MEMBER_PRUNE
|
|
213
|
+
*/
|
|
214
|
+
members_removed?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Channel in which the entities were targeted
|
|
217
|
+
*
|
|
218
|
+
* Present from:
|
|
219
|
+
* - MEMBER_MOVE
|
|
220
|
+
* - MESSAGE_PIN
|
|
221
|
+
* - MESSAGE_UNPIN
|
|
222
|
+
* - MESSAGE_DELETE
|
|
223
|
+
* - STAGE_INSTANCE_CREATE
|
|
224
|
+
* - STAGE_INSTANCE_UPDATE
|
|
225
|
+
* - STAGE_INSTANCE_DELETE
|
|
226
|
+
* - AUTO_MODERATION_BLOCK_MESSAGE
|
|
227
|
+
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
|
228
|
+
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
|
229
|
+
*/
|
|
230
|
+
channel_id?: Snowflake;
|
|
231
|
+
/**
|
|
232
|
+
* ID of the message that was targeted
|
|
233
|
+
*
|
|
234
|
+
* Present from:
|
|
235
|
+
* - MESSAGE_PIN
|
|
236
|
+
* - MESSAGE_UNPIN
|
|
237
|
+
*/
|
|
238
|
+
message_id?: Snowflake;
|
|
239
|
+
/**
|
|
240
|
+
* Number of entities that were targeted
|
|
241
|
+
*
|
|
242
|
+
* Present from:
|
|
243
|
+
* - MESSAGE_DELETE
|
|
244
|
+
* - MESSAGE_BULK_DELETE
|
|
245
|
+
* - MEMBER_DISCONNECT
|
|
246
|
+
* - MEMBER_MOVE
|
|
247
|
+
*/
|
|
248
|
+
count?: string;
|
|
249
|
+
/**
|
|
250
|
+
* ID of the overwritten entity
|
|
251
|
+
*
|
|
252
|
+
* Present from:
|
|
253
|
+
* - CHANNEL_OVERWRITE_CREATE
|
|
254
|
+
* - CHANNEL_OVERWRITE_UPDATE
|
|
255
|
+
* - CHANNEL_OVERWRITE_DELETE
|
|
256
|
+
*/
|
|
257
|
+
id?: Snowflake;
|
|
258
|
+
/**
|
|
259
|
+
* Type of overwritten entity - "0" for "role" or "1" for "member"
|
|
260
|
+
*
|
|
261
|
+
* Present from:
|
|
262
|
+
* - CHANNEL_OVERWRITE_CREATE
|
|
263
|
+
* - CHANNEL_OVERWRITE_UPDATE
|
|
264
|
+
* - CHANNEL_OVERWRITE_DELETE
|
|
265
|
+
*
|
|
266
|
+
* {@link AuditLogOptionsType}
|
|
267
|
+
*/
|
|
268
|
+
type?: AuditLogOptionsType;
|
|
269
|
+
/**
|
|
270
|
+
* Name of the role
|
|
271
|
+
*
|
|
272
|
+
* Present from:
|
|
273
|
+
* - CHANNEL_OVERWRITE_CREATE
|
|
274
|
+
* - CHANNEL_OVERWRITE_UPDATE
|
|
275
|
+
* - CHANNEL_OVERWRITE_DELETE
|
|
276
|
+
*
|
|
277
|
+
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
|
278
|
+
*/
|
|
279
|
+
role_name?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Type of integration which performed the action
|
|
282
|
+
*
|
|
283
|
+
* Present from:
|
|
284
|
+
* - MEMBER_KICK
|
|
285
|
+
* - MEMBER_ROLE_UPDATE
|
|
286
|
+
*/
|
|
287
|
+
integration_type?: APIGuildIntegrationType;
|
|
288
|
+
}
|
|
289
|
+
export declare enum AuditLogOptionsType {
|
|
290
|
+
Role = "0",
|
|
291
|
+
Member = "1"
|
|
292
|
+
}
|
|
293
|
+
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
|
|
294
|
+
/**
|
|
295
|
+
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
|
|
296
|
+
*/
|
|
297
|
+
export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDefaultReactionEmoji | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyExemptChannels | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelFlags | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled;
|
|
298
|
+
/**
|
|
299
|
+
* Returned when an entity's name is changed
|
|
300
|
+
*/
|
|
301
|
+
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
|
|
302
|
+
/**
|
|
303
|
+
* Returned when a guild's or sticker's or guild scheduled event's description is changed
|
|
304
|
+
*/
|
|
305
|
+
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
|
|
306
|
+
/**
|
|
307
|
+
* Returned when a guild's icon is changed
|
|
308
|
+
*/
|
|
309
|
+
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
|
|
310
|
+
/**
|
|
311
|
+
* Returned when a guild's scheduled event's cover image is changed
|
|
312
|
+
*/
|
|
313
|
+
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
|
|
314
|
+
/**
|
|
315
|
+
* Returned when a guild's splash is changed
|
|
316
|
+
*/
|
|
317
|
+
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
|
|
318
|
+
/**
|
|
319
|
+
* Returned when a guild's discovery splash is changed
|
|
320
|
+
*/
|
|
321
|
+
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
|
|
322
|
+
/**
|
|
323
|
+
* Returned when a guild's banner hash is changed
|
|
324
|
+
*/
|
|
325
|
+
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
|
|
326
|
+
/**
|
|
327
|
+
* Returned when a guild's owner_id is changed
|
|
328
|
+
*/
|
|
329
|
+
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
|
|
330
|
+
/**
|
|
331
|
+
* Returned when a guild's region is changed
|
|
332
|
+
*/
|
|
333
|
+
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
|
|
334
|
+
/**
|
|
335
|
+
* Returned when a guild's preferred_locale is changed
|
|
336
|
+
*/
|
|
337
|
+
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
|
|
338
|
+
/**
|
|
339
|
+
* Returned when a guild's afk_channel_id is changed
|
|
340
|
+
*/
|
|
341
|
+
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
|
|
342
|
+
/**
|
|
343
|
+
* Returned when a guild's afk_timeout is changed
|
|
344
|
+
*/
|
|
345
|
+
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
|
|
346
|
+
/**
|
|
347
|
+
* Returned when a guild's rules_channel_id is changed
|
|
348
|
+
*/
|
|
349
|
+
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
|
|
350
|
+
/**
|
|
351
|
+
* Returned when a guild's public_updates_channel_id is changed
|
|
352
|
+
*/
|
|
353
|
+
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
|
354
|
+
/**
|
|
355
|
+
* Returned when a guild's safety_alerts_channel_id is changed
|
|
356
|
+
*/
|
|
357
|
+
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
|
358
|
+
/**
|
|
359
|
+
* Returned when a guild's mfa_level is changed
|
|
360
|
+
*/
|
|
361
|
+
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
|
|
362
|
+
/**
|
|
363
|
+
* Returned when a guild's verification_level is changed
|
|
364
|
+
*/
|
|
365
|
+
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
|
366
|
+
/**
|
|
367
|
+
* Returned when a guild's explicit_content_filter is changed
|
|
368
|
+
*/
|
|
369
|
+
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
|
|
370
|
+
/**
|
|
371
|
+
* Returned when a guild's default_message_notifications is changed
|
|
372
|
+
*/
|
|
373
|
+
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
|
|
374
|
+
/**
|
|
375
|
+
* Returned when a guild's vanity_url_code is changed
|
|
376
|
+
*/
|
|
377
|
+
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
|
|
378
|
+
/**
|
|
379
|
+
* Returned when new role(s) are added
|
|
380
|
+
*/
|
|
381
|
+
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
|
|
382
|
+
/**
|
|
383
|
+
* Returned when role(s) are removed
|
|
384
|
+
*/
|
|
385
|
+
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
|
|
386
|
+
/**
|
|
387
|
+
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
|
|
388
|
+
*/
|
|
389
|
+
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
|
|
390
|
+
/**
|
|
391
|
+
* Returned when a guild's widget is enabled
|
|
392
|
+
*/
|
|
393
|
+
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
|
|
394
|
+
/**
|
|
395
|
+
* Returned when a guild's widget_channel_id is changed
|
|
396
|
+
*/
|
|
397
|
+
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
|
|
398
|
+
/**
|
|
399
|
+
* Returned when a guild's system_channel_flags is changed
|
|
400
|
+
*/
|
|
401
|
+
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<'system_channel_flags', GuildSystemChannelFlags>;
|
|
402
|
+
/**
|
|
403
|
+
* Returned when a guild's system_channel_id is changed
|
|
404
|
+
*/
|
|
405
|
+
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
|
|
406
|
+
/**
|
|
407
|
+
* Returned when a channel's position is changed
|
|
408
|
+
*/
|
|
409
|
+
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
|
|
410
|
+
/**
|
|
411
|
+
* Returned when a channel's topic is changed
|
|
412
|
+
*/
|
|
413
|
+
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
|
|
414
|
+
/**
|
|
415
|
+
* Returned when a voice channel's bitrate is changed
|
|
416
|
+
*/
|
|
417
|
+
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
|
|
418
|
+
/**
|
|
419
|
+
* Returned when a channel's permission overwrites is changed
|
|
420
|
+
*/
|
|
421
|
+
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
|
422
|
+
/**
|
|
423
|
+
* Returned when a channel's NSFW restriction is changed
|
|
424
|
+
*/
|
|
425
|
+
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
|
|
426
|
+
/**
|
|
427
|
+
* The application ID of the added or removed Webhook or Bot
|
|
428
|
+
*/
|
|
429
|
+
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
|
|
430
|
+
/**
|
|
431
|
+
* Returned when a channel's amount of seconds a user has to wait before sending another message
|
|
432
|
+
* is changed
|
|
433
|
+
*/
|
|
434
|
+
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
|
|
435
|
+
/**
|
|
436
|
+
* Returned when a permission bitfield is changed
|
|
437
|
+
*/
|
|
438
|
+
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
|
|
439
|
+
/**
|
|
440
|
+
* Returned when a role's color is changed
|
|
441
|
+
*/
|
|
442
|
+
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
|
|
443
|
+
/**
|
|
444
|
+
* Represents a change where the key is a snowflake.
|
|
445
|
+
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
|
|
446
|
+
*/
|
|
447
|
+
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
|
|
448
|
+
/**
|
|
449
|
+
* Returned when a role's hoist status is changed
|
|
450
|
+
*/
|
|
451
|
+
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
|
|
452
|
+
/**
|
|
453
|
+
* Returned when a role's mentionable status is changed
|
|
454
|
+
*/
|
|
455
|
+
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
|
|
456
|
+
/**
|
|
457
|
+
* Returned when an overwrite's allowed permissions bitfield is changed
|
|
458
|
+
*/
|
|
459
|
+
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
|
|
460
|
+
/**
|
|
461
|
+
* Returned when an overwrite's denied permissions bitfield is changed
|
|
462
|
+
*/
|
|
463
|
+
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
|
|
464
|
+
/**
|
|
465
|
+
* Returned when an invite's code is changed
|
|
466
|
+
*/
|
|
467
|
+
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
|
|
468
|
+
/**
|
|
469
|
+
* Returned when an invite's or guild scheduled event's channel_id is changed
|
|
470
|
+
*/
|
|
471
|
+
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
|
|
472
|
+
/**
|
|
473
|
+
* Returned when an invite's inviter_id is changed
|
|
474
|
+
*/
|
|
475
|
+
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
|
|
476
|
+
/**
|
|
477
|
+
* Returned when an invite's max_uses is changed
|
|
478
|
+
*/
|
|
479
|
+
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
|
|
480
|
+
/**
|
|
481
|
+
* Returned when an invite's uses is changed
|
|
482
|
+
*/
|
|
483
|
+
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
|
|
484
|
+
/**
|
|
485
|
+
* Returned when an invite's max_age is changed
|
|
486
|
+
*/
|
|
487
|
+
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
|
|
488
|
+
/**
|
|
489
|
+
* Returned when an invite's temporary status is changed
|
|
490
|
+
*/
|
|
491
|
+
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
|
|
492
|
+
/**
|
|
493
|
+
* Returned when a user's deaf status is changed
|
|
494
|
+
*/
|
|
495
|
+
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
|
|
496
|
+
/**
|
|
497
|
+
* Returned when a user's mute status is changed
|
|
498
|
+
*/
|
|
499
|
+
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
|
|
500
|
+
/**
|
|
501
|
+
* Returned when a user's nick is changed
|
|
502
|
+
*/
|
|
503
|
+
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
|
|
504
|
+
/**
|
|
505
|
+
* Returned when a user's avatar_hash is changed
|
|
506
|
+
*/
|
|
507
|
+
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
|
|
508
|
+
/**
|
|
509
|
+
* The ID of the changed entity - sometimes used in conjunction with other keys
|
|
510
|
+
*/
|
|
511
|
+
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
|
|
512
|
+
/**
|
|
513
|
+
* The type of entity created
|
|
514
|
+
*/
|
|
515
|
+
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
|
|
516
|
+
/**
|
|
517
|
+
* Returned when an integration's enable_emoticons is changed
|
|
518
|
+
*/
|
|
519
|
+
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
|
|
520
|
+
/**
|
|
521
|
+
* Returned when an integration's expire_behavior is changed
|
|
522
|
+
*/
|
|
523
|
+
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
|
524
|
+
/**
|
|
525
|
+
* Returned when an integration's expire_grace_period is changed
|
|
526
|
+
*/
|
|
527
|
+
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
|
|
528
|
+
/**
|
|
529
|
+
* Returned when a voice channel's user_limit is changed
|
|
530
|
+
*/
|
|
531
|
+
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
|
532
|
+
/**
|
|
533
|
+
* Returned when privacy level of a stage instance or guild scheduled event is changed
|
|
534
|
+
*/
|
|
535
|
+
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
|
536
|
+
/**
|
|
537
|
+
* Returned when a sticker's related emoji is changed
|
|
538
|
+
*/
|
|
539
|
+
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
|
|
540
|
+
/**
|
|
541
|
+
* Returned when a sticker's format_type is changed
|
|
542
|
+
*/
|
|
543
|
+
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
|
|
544
|
+
/**
|
|
545
|
+
* Empty string
|
|
546
|
+
*/
|
|
547
|
+
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
|
|
548
|
+
/**
|
|
549
|
+
* Returned when a sticker's availability is changed
|
|
550
|
+
*/
|
|
551
|
+
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
|
|
552
|
+
/**
|
|
553
|
+
* Returned when a sticker's guild_id is changed
|
|
554
|
+
*/
|
|
555
|
+
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
|
556
|
+
/**
|
|
557
|
+
* Returned when a thread's archive status is changed
|
|
558
|
+
*/
|
|
559
|
+
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
|
560
|
+
/**
|
|
561
|
+
* Returned when a thread's lock status is changed
|
|
562
|
+
*/
|
|
563
|
+
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
|
564
|
+
/**
|
|
565
|
+
* Returned when a thread's auto archive duration is changed
|
|
566
|
+
*/
|
|
567
|
+
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
|
568
|
+
/**
|
|
569
|
+
* Returned when a channel's default auto archive duration for newly created threads is changed
|
|
570
|
+
*/
|
|
571
|
+
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<'default_auto_archive_duration', number>;
|
|
572
|
+
/**
|
|
573
|
+
* Returned when entity type of a guild scheduled event is changed
|
|
574
|
+
*/
|
|
575
|
+
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
|
576
|
+
/**
|
|
577
|
+
* Returned when status of a guild scheduled event is changed
|
|
578
|
+
*/
|
|
579
|
+
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
|
|
580
|
+
/**
|
|
581
|
+
* Returned when location of a guild scheduled event is changed
|
|
582
|
+
*/
|
|
583
|
+
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
|
584
|
+
/**
|
|
585
|
+
* Returned when a user's timeout is changed
|
|
586
|
+
*/
|
|
587
|
+
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
|
588
|
+
/**
|
|
589
|
+
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
|
|
590
|
+
*/
|
|
591
|
+
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
|
|
592
|
+
/**
|
|
593
|
+
* Returned when an auto moderation rule's event type is changed
|
|
594
|
+
*/
|
|
595
|
+
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
|
|
596
|
+
/**
|
|
597
|
+
* Returned when an auto moderation rule's trigger metadata is changed
|
|
598
|
+
*/
|
|
599
|
+
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>;
|
|
600
|
+
/**
|
|
601
|
+
* Returned when an auto moderation rule's actions is changed
|
|
602
|
+
*/
|
|
603
|
+
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
|
|
604
|
+
/**
|
|
605
|
+
* Returned when an auto moderation rule's enabled status is changed
|
|
606
|
+
*/
|
|
607
|
+
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
|
|
608
|
+
/**
|
|
609
|
+
* Returned when an auto moderation rule's exempt roles is changed
|
|
610
|
+
*/
|
|
611
|
+
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
|
|
612
|
+
/**
|
|
613
|
+
* Returned when an auto moderation rule's exempt channels is changed
|
|
614
|
+
*/
|
|
615
|
+
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
|
|
616
|
+
/**
|
|
617
|
+
* Returned when a guild forum's available tags gets changed
|
|
618
|
+
*/
|
|
619
|
+
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
|
|
620
|
+
/**
|
|
621
|
+
* Returned when a guild forum's default reaction emoji gets changed
|
|
622
|
+
*/
|
|
623
|
+
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<'default_reaction_emoji', APIGuildForumDefaultReactionEmoji>;
|
|
624
|
+
/**
|
|
625
|
+
* Returned when a channel flag gets changed
|
|
626
|
+
*/
|
|
627
|
+
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
|
|
628
|
+
/**
|
|
629
|
+
* Returned when a thread's amount of seconds a user has to wait before creating another thread
|
|
630
|
+
* gets changed
|
|
631
|
+
*/
|
|
632
|
+
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<'default_thread_rate_limit_per_user', number>;
|
|
633
|
+
interface AuditLogChangeData<K extends string, D> {
|
|
634
|
+
key: K;
|
|
635
|
+
/**
|
|
636
|
+
* The new value
|
|
637
|
+
*
|
|
638
|
+
* If `new_value` is not present in the change object, while `old_value` is,
|
|
639
|
+
* that means the property that was changed has been reset, or set to `null`
|
|
640
|
+
*/
|
|
641
|
+
new_value?: D;
|
|
642
|
+
old_value?: D;
|
|
643
|
+
}
|
|
644
|
+
export {};
|