seyfert 1.4.0 → 2.0.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 +22 -14
- package/lib/api/Router.js +5 -3
- 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 +8 -2
- package/lib/api/Routes/interactions.d.ts +1 -1
- package/lib/api/Routes/invites.d.ts +1 -1
- 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 +2 -2
- package/lib/api/api.js +2 -14
- package/lib/api/bucket.d.ts +0 -1
- package/lib/api/shared.d.ts +0 -1
- 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 +2 -3
- package/lib/builders/Attachment.js +12 -13
- 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 +24 -11
- package/lib/cache/index.js +335 -19
- package/lib/cache/resources/bans.d.ts +15 -0
- package/lib/cache/resources/bans.js +44 -0
- 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 +24 -8
- package/lib/cache/resources/messages.d.ts +11 -7
- package/lib/cache/resources/messages.js +25 -11
- 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 +32 -20
- package/lib/client/base.js +51 -30
- package/lib/client/client.d.ts +12 -9
- package/lib/client/client.js +43 -49
- package/lib/client/collectors.d.ts +36 -0
- package/lib/client/collectors.js +110 -0
- 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 +18 -15
- package/lib/client/workerclient.js +148 -110
- package/lib/collection.d.ts +2 -2
- package/lib/collection.js +2 -2
- package/lib/commands/applications/chat.d.ts +40 -38
- package/lib/commands/applications/chat.js +22 -12
- package/lib/commands/applications/chatcontext.d.ts +17 -17
- package/lib/commands/applications/chatcontext.js +5 -5
- package/lib/commands/applications/menu.d.ts +9 -9
- package/lib/commands/applications/menu.js +5 -7
- package/lib/commands/applications/menucontext.d.ts +14 -13
- package/lib/commands/applications/menucontext.js +9 -9
- package/lib/commands/applications/options.d.ts +1 -1
- package/lib/commands/applications/options.js +20 -21
- package/lib/commands/applications/shared.d.ts +14 -0
- package/lib/commands/decorators.d.ts +47 -35
- package/lib/commands/decorators.js +19 -27
- package/lib/commands/handle.d.ts +64 -0
- package/lib/commands/handle.js +685 -0
- package/lib/commands/handler.d.ts +27 -18
- package/lib/commands/handler.js +296 -160
- package/lib/commands/optionresolver.d.ts +13 -13
- package/lib/commands/optionresolver.js +23 -28
- package/lib/common/bot/watcher.d.ts +4 -33
- package/lib/common/bot/watcher.js +0 -109
- package/lib/common/index.d.ts +2 -0
- package/lib/common/index.js +4 -1
- package/lib/common/it/colors.js +48 -49
- package/lib/common/it/formatter.d.ts +187 -0
- package/lib/common/it/formatter.js +226 -0
- package/lib/common/it/logger.d.ts +0 -1
- package/lib/common/it/logger.js +8 -8
- package/lib/common/it/utils.d.ts +15 -2
- package/lib/common/it/utils.js +80 -21
- package/lib/common/shorters/application.d.ts +56 -0
- package/lib/common/shorters/application.js +81 -0
- package/lib/common/shorters/bans.d.ts +42 -0
- package/lib/common/shorters/bans.js +78 -0
- 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 +8 -7
- package/lib/common/shorters/guilds.d.ts +18 -16
- package/lib/common/shorters/guilds.js +31 -26
- package/lib/common/shorters/interaction.d.ts +6 -6
- package/lib/common/shorters/interaction.js +12 -9
- 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 +10 -9
- 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 +12 -11
- package/lib/common/types/resolvables.d.ts +2 -2
- package/lib/common/types/util.d.ts +3 -1
- package/lib/common/types/write.d.ts +1 -1
- 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.d.ts +3 -2
- package/lib/components/componentcommand.js +4 -3
- package/lib/components/componentcontext.d.ts +11 -10
- package/lib/components/componentcontext.js +8 -8
- package/lib/components/handler.d.ts +16 -15
- package/lib/components/handler.js +101 -108
- package/lib/components/index.d.ts +3 -3
- package/lib/components/index.js +12 -10
- package/lib/components/modalcommand.d.ts +2 -1
- package/lib/components/modalcommand.js +1 -0
- package/lib/components/modalcontext.d.ts +13 -12
- package/lib/components/modalcontext.js +2 -2
- package/lib/deps/mixer.d.ts +8 -0
- package/lib/deps/mixer.js +66 -0
- package/lib/events/event.d.ts +4 -3
- package/lib/events/handler.d.ts +40 -15
- package/lib/events/handler.js +99 -21
- 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 +3 -3
- 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 +126 -181
- package/lib/events/hooks/guild.js +13 -15
- package/lib/events/hooks/integration.d.ts +71 -15
- 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 -14
- package/lib/events/hooks/message.d.ts +72 -52
- package/lib/events/hooks/message.js +4 -8
- package/lib/events/hooks/presence.d.ts +21 -16
- package/lib/events/hooks/stage.d.ts +4 -4
- package/lib/events/hooks/thread.d.ts +140 -60
- package/lib/events/hooks/thread.js +4 -4
- package/lib/events/hooks/typing.d.ts +28 -5
- 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 +6 -15
- package/lib/index.js +8 -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 +37 -30
- package/lib/structures/Guild.js +7 -2
- package/lib/structures/GuildBan.d.ts +25 -0
- package/lib/structures/GuildBan.js +37 -0
- package/lib/structures/GuildEmoji.d.ts +4 -4
- package/lib/structures/GuildEmoji.js +3 -2
- package/lib/structures/GuildMember.d.ts +27 -19
- package/lib/structures/GuildMember.js +21 -11
- 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 +56 -38
- package/lib/structures/Interaction.js +134 -86
- package/lib/structures/Message.d.ts +80 -20
- package/lib/structures/Message.js +67 -26
- package/lib/structures/Poll.d.ts +4 -3
- package/lib/structures/Poll.js +6 -2
- package/lib/structures/Sticker.d.ts +10 -10
- package/lib/structures/Sticker.js +7 -7
- package/lib/structures/User.d.ts +6 -4
- package/lib/structures/User.js +6 -2
- 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 +14 -10
- package/lib/structures/channels.js +97 -62
- package/lib/structures/extra/BaseGuild.d.ts +1 -1
- package/lib/structures/extra/BaseGuild.js +3 -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 +1537 -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 +60 -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 +153 -0
- package/lib/types/payloads/_interactions/applicationCommands.js +61 -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 +112 -0
- package/lib/types/payloads/_interactions/responses.js +54 -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 +1708 -0
- package/lib/types/payloads/channel.js +372 -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 +150 -0
- package/lib/types/payloads/monetization.js +79 -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 +712 -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 +194 -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 +82 -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 +797 -0
- package/lib/types/utils/index.js +799 -0
- package/lib/websocket/SharedTypes.d.ts +4 -3
- package/lib/websocket/SharedTypes.js +1 -1
- package/lib/websocket/constants/index.d.ts +0 -1
- package/lib/websocket/discord/basesocket.d.ts +7 -6
- package/lib/websocket/discord/basesocket.js +35 -6
- 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 +65 -47
- package/lib/websocket/discord/sharder.d.ts +6 -5
- package/lib/websocket/discord/sharder.js +11 -10
- package/lib/websocket/discord/shared.d.ts +13 -5
- package/lib/websocket/discord/socket/custom.d.ts +52 -0
- package/lib/websocket/discord/socket/custom.js +283 -0
- package/lib/websocket/discord/worker.d.ts +5 -10
- package/lib/websocket/discord/workermanager.d.ts +8 -15
- package/lib/websocket/discord/workermanager.js +35 -39
- 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 +65 -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 -3
- package/lib/client/onmessagecreate.js +0 -395
- package/lib/structures/extra/functions.d.ts +0 -12
- package/lib/structures/extra/functions.js +0 -70
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { Snowflake } from '..';
|
|
2
|
+
import type { APIWebhook, APIEmbed, APIAllowedMentions, APIActionRowComponent, APIMessageActionRowComponent, MessageFlags, APIMessage } from '../payloads';
|
|
3
|
+
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../utils';
|
|
4
|
+
import type { RESTAPIAttachment } from './channel';
|
|
5
|
+
import type { RESTAPIPollCreate } from './poll';
|
|
6
|
+
/**
|
|
7
|
+
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
|
8
|
+
*/
|
|
9
|
+
export interface RESTPostAPIChannelWebhookJSONBody {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the webhook (1-80 characters)
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Image for the default webhook avatar
|
|
16
|
+
*
|
|
17
|
+
* See https://discord.com/developers/docs/reference#image-data
|
|
18
|
+
*/
|
|
19
|
+
avatar?: string | null | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
|
23
|
+
*/
|
|
24
|
+
export type RESTPostAPIChannelWebhookResult = APIWebhook;
|
|
25
|
+
/**
|
|
26
|
+
* https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
|
|
27
|
+
*/
|
|
28
|
+
export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
|
|
29
|
+
/**
|
|
30
|
+
* https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
|
|
31
|
+
*/
|
|
32
|
+
export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
|
|
33
|
+
/**
|
|
34
|
+
* https://discord.com/developers/docs/resources/webhook#get-webhook
|
|
35
|
+
*/
|
|
36
|
+
export type RESTGetAPIWebhookResult = APIWebhook;
|
|
37
|
+
/**
|
|
38
|
+
* https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
|
|
39
|
+
*/
|
|
40
|
+
export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
|
|
41
|
+
/**
|
|
42
|
+
* https://discord.com/developers/docs/resources/webhook#modify-webhook
|
|
43
|
+
*/
|
|
44
|
+
export interface RESTPatchAPIWebhookJSONBody {
|
|
45
|
+
/**
|
|
46
|
+
* The default name of the webhook
|
|
47
|
+
*/
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Image for the default webhook avatar
|
|
51
|
+
*
|
|
52
|
+
* See https://discord.com/developers/docs/reference#image-data
|
|
53
|
+
*/
|
|
54
|
+
avatar?: string | null | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The new channel id this webhook should be moved to
|
|
57
|
+
*/
|
|
58
|
+
channel_id?: Snowflake | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* https://discord.com/developers/docs/resources/webhook#modify-webhook
|
|
62
|
+
*/
|
|
63
|
+
export type RESTPatchAPIWebhookResult = APIWebhook;
|
|
64
|
+
/**
|
|
65
|
+
* https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
|
|
66
|
+
*/
|
|
67
|
+
export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
|
|
68
|
+
/**
|
|
69
|
+
* https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
|
|
70
|
+
*/
|
|
71
|
+
export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult;
|
|
72
|
+
/**
|
|
73
|
+
* https://discord.com/developers/docs/resources/webhook#delete-webhook
|
|
74
|
+
*/
|
|
75
|
+
export type RESTDeleteAPIWebhookResult = never;
|
|
76
|
+
/**
|
|
77
|
+
* https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
|
|
78
|
+
*/
|
|
79
|
+
export type RESTDeleteAPIWebhookWithTokenResult = never;
|
|
80
|
+
/**
|
|
81
|
+
* https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
82
|
+
*/
|
|
83
|
+
export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
84
|
+
/**
|
|
85
|
+
* The message contents (up to 2000 characters)
|
|
86
|
+
*/
|
|
87
|
+
content?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Override the default username of the webhook
|
|
90
|
+
*/
|
|
91
|
+
username?: string | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Override the default avatar of the webhook
|
|
94
|
+
*/
|
|
95
|
+
avatar_url?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* `true` if this is a TTS message
|
|
98
|
+
*/
|
|
99
|
+
tts?: boolean | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Embedded `rich` content
|
|
102
|
+
*
|
|
103
|
+
* See https://discord.com/developers/docs/resources/channel#embed-object
|
|
104
|
+
*/
|
|
105
|
+
embeds?: APIEmbed[] | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Allowed mentions for the message
|
|
108
|
+
*
|
|
109
|
+
* See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
|
|
110
|
+
*/
|
|
111
|
+
allowed_mentions?: APIAllowedMentions | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* The components to include with the message
|
|
114
|
+
*
|
|
115
|
+
* Requires an application-owned webhook
|
|
116
|
+
*
|
|
117
|
+
* See https://discord.com/developers/docs/interactions/message-components#component-object
|
|
118
|
+
*/
|
|
119
|
+
components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Attachment objects with filename and description
|
|
122
|
+
*/
|
|
123
|
+
attachments?: RESTAPIAttachment[] | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Message flags combined as a bitfield
|
|
126
|
+
*/
|
|
127
|
+
flags?: MessageFlags | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Name of thread to create
|
|
130
|
+
*
|
|
131
|
+
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
|
|
132
|
+
*/
|
|
133
|
+
thread_name?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Array of tag ids to apply to the thread
|
|
136
|
+
*/
|
|
137
|
+
applied_tags?: Snowflake[] | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* A poll!
|
|
140
|
+
*/
|
|
141
|
+
poll?: RESTAPIPollCreate | undefined;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
145
|
+
*/
|
|
146
|
+
export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`, unknown> & {
|
|
147
|
+
/**
|
|
148
|
+
* JSON stringified message body
|
|
149
|
+
*/
|
|
150
|
+
payload_json?: string | undefined;
|
|
151
|
+
}) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIWebhookWithTokenJSONBody);
|
|
152
|
+
/**
|
|
153
|
+
* https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params
|
|
154
|
+
*/
|
|
155
|
+
export interface RESTPostAPIWebhookWithTokenQuery {
|
|
156
|
+
/**
|
|
157
|
+
* Waits for server confirmation of message send before response, and returns the created message body
|
|
158
|
+
* (defaults to `false`; when `false` a message that is not saved does not return an error)
|
|
159
|
+
*
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
wait?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived.
|
|
165
|
+
*
|
|
166
|
+
* Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified
|
|
167
|
+
*/
|
|
168
|
+
thread_id?: Snowflake;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
172
|
+
*/
|
|
173
|
+
export type RESTPostAPIWebhookWithTokenResult = never;
|
|
174
|
+
/**
|
|
175
|
+
* Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
|
|
176
|
+
* the `wait` query parameter set to `true`
|
|
177
|
+
*
|
|
178
|
+
* See https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params
|
|
179
|
+
*/
|
|
180
|
+
export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
|
|
181
|
+
/**
|
|
182
|
+
* https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params
|
|
183
|
+
*/
|
|
184
|
+
export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery;
|
|
185
|
+
/**
|
|
186
|
+
* https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
|
|
187
|
+
*/
|
|
188
|
+
export type RESTPostAPIWebhookWithTokenSlackResult = never;
|
|
189
|
+
/**
|
|
190
|
+
* Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
|
|
191
|
+
* the `wait` query parameter set to `true`
|
|
192
|
+
*
|
|
193
|
+
* See https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params
|
|
194
|
+
*/
|
|
195
|
+
export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
|
|
196
|
+
/**
|
|
197
|
+
* https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params
|
|
198
|
+
*/
|
|
199
|
+
export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery;
|
|
200
|
+
/**
|
|
201
|
+
* https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
|
|
202
|
+
*/
|
|
203
|
+
export type RESTPostAPIWebhookWithTokenGitHubResult = never;
|
|
204
|
+
/**
|
|
205
|
+
* Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
|
|
206
|
+
* the `wait` query parameter set to `true`
|
|
207
|
+
*
|
|
208
|
+
* See https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params
|
|
209
|
+
*/
|
|
210
|
+
export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage;
|
|
211
|
+
/**
|
|
212
|
+
* https://discord.com/developers/docs/resources/webhook#get-webhook-message
|
|
213
|
+
*/
|
|
214
|
+
export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
|
215
|
+
/**
|
|
216
|
+
* https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params
|
|
217
|
+
*/
|
|
218
|
+
export interface RESTGetAPIWebhookWithTokenMessageQuery {
|
|
219
|
+
thread_id?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
|
223
|
+
*/
|
|
224
|
+
export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>> & {
|
|
225
|
+
/**
|
|
226
|
+
* Attached files to keep
|
|
227
|
+
*
|
|
228
|
+
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
|
|
229
|
+
*
|
|
230
|
+
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
|
231
|
+
*/
|
|
232
|
+
attachments?: RESTAPIAttachment[] | undefined;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
|
236
|
+
*/
|
|
237
|
+
export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & {
|
|
238
|
+
/**
|
|
239
|
+
* JSON stringified message body
|
|
240
|
+
*/
|
|
241
|
+
payload_json?: string | undefined;
|
|
242
|
+
}) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIWebhookWithTokenMessageJSONBody);
|
|
243
|
+
/**
|
|
244
|
+
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
|
245
|
+
*/
|
|
246
|
+
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
|
247
|
+
/**
|
|
248
|
+
* https://discord.com/developers/docs/resources/webhook#delete-webhook-message
|
|
249
|
+
*/
|
|
250
|
+
export type RESTDeleteAPIWebhookWithTokenMessageResult = never;
|