seyfert 0.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 +190 -0
- package/README.md +57 -0
- package/lib/api/CDN.d.ts +220 -0
- package/lib/api/CDN.js +236 -0
- package/lib/api/REST.d.ts +127 -0
- package/lib/api/REST.js +424 -0
- package/lib/api/Router.d.ts +17 -0
- package/lib/api/Router.js +63 -0
- package/lib/api/Routes/applications.d.ts +46 -0
- package/lib/api/Routes/applications.js +2 -0
- package/lib/api/Routes/cdn.d.ts +66 -0
- package/lib/api/Routes/cdn.js +2 -0
- package/lib/api/Routes/channels.d.ts +109 -0
- package/lib/api/Routes/channels.js +2 -0
- package/lib/api/Routes/gateway.d.ts +11 -0
- package/lib/api/Routes/gateway.js +2 -0
- package/lib/api/Routes/guilds.d.ts +171 -0
- package/lib/api/Routes/guilds.js +2 -0
- package/lib/api/Routes/index.d.ts +13 -0
- package/lib/api/Routes/index.js +17 -0
- package/lib/api/Routes/interactions.d.ts +14 -0
- package/lib/api/Routes/interactions.js +2 -0
- package/lib/api/Routes/invites.d.ts +9 -0
- package/lib/api/Routes/invites.js +2 -0
- package/lib/api/Routes/stage-instances.d.ts +13 -0
- package/lib/api/Routes/stage-instances.js +2 -0
- package/lib/api/Routes/stickers.d.ts +11 -0
- package/lib/api/Routes/stickers.js +2 -0
- package/lib/api/Routes/users.d.ts +35 -0
- package/lib/api/Routes/users.js +2 -0
- package/lib/api/Routes/voice.d.ts +10 -0
- package/lib/api/Routes/voice.js +2 -0
- package/lib/api/Routes/webhooks.d.ts +29 -0
- package/lib/api/Routes/webhooks.js +2 -0
- package/lib/api/errors/DiscordAPIError.d.ts +51 -0
- package/lib/api/errors/DiscordAPIError.js +81 -0
- package/lib/api/errors/HTTPError.d.ts +20 -0
- package/lib/api/errors/HTTPError.js +28 -0
- package/lib/api/errors/RateLimitError.d.ts +19 -0
- package/lib/api/errors/RateLimitError.js +37 -0
- package/lib/api/handlers/BurstHandler.d.ts +51 -0
- package/lib/api/handlers/BurstHandler.js +124 -0
- package/lib/api/handlers/SequentialHandler.d.ts +81 -0
- package/lib/api/handlers/SequentialHandler.js +365 -0
- package/lib/api/handlers/Shared.d.ts +14 -0
- package/lib/api/handlers/Shared.js +125 -0
- package/lib/api/index.d.ts +5 -0
- package/lib/api/index.js +21 -0
- package/lib/api/interfaces/Handler.d.ts +21 -0
- package/lib/api/interfaces/Handler.js +2 -0
- package/lib/api/shared.d.ts +7 -0
- package/lib/api/shared.js +27 -0
- package/lib/api/utils/constants.d.ts +39 -0
- package/lib/api/utils/constants.js +50 -0
- package/lib/api/utils/types.d.ts +335 -0
- package/lib/api/utils/types.js +14 -0
- package/lib/api/utils/utils.d.ts +52 -0
- package/lib/api/utils/utils.js +159 -0
- package/lib/builders/ActionRow.d.ts +40 -0
- package/lib/builders/ActionRow.js +58 -0
- package/lib/builders/Attachment.d.ts +106 -0
- package/lib/builders/Attachment.js +196 -0
- package/lib/builders/Base.d.ts +10 -0
- package/lib/builders/Base.js +13 -0
- package/lib/builders/Button.d.ts +59 -0
- package/lib/builders/Button.js +94 -0
- package/lib/builders/MessageEmbed.d.ts +116 -0
- package/lib/builders/MessageEmbed.js +159 -0
- package/lib/builders/Modal.d.ts +111 -0
- package/lib/builders/Modal.js +162 -0
- package/lib/builders/SelectMenu.d.ts +201 -0
- package/lib/builders/SelectMenu.js +293 -0
- package/lib/builders/index.d.ts +12 -0
- package/lib/builders/index.js +54 -0
- package/lib/builders/types.d.ts +21 -0
- package/lib/builders/types.js +2 -0
- package/lib/cache/adapters/default.d.ts +24 -0
- package/lib/cache/adapters/default.js +118 -0
- package/lib/cache/adapters/index.d.ts +4 -0
- package/lib/cache/adapters/index.js +20 -0
- package/lib/cache/adapters/redis.d.ts +35 -0
- package/lib/cache/adapters/redis.js +180 -0
- package/lib/cache/adapters/types.d.ts +25 -0
- package/lib/cache/adapters/types.js +2 -0
- package/lib/cache/adapters/workeradapter.d.ts +24 -0
- package/lib/cache/adapters/workeradapter.js +76 -0
- package/lib/cache/index.d.ts +97 -0
- package/lib/cache/index.js +394 -0
- package/lib/cache/resources/channels.d.ts +7 -0
- package/lib/cache/resources/channels.js +20 -0
- package/lib/cache/resources/default/base.d.ts +25 -0
- package/lib/cache/resources/default/base.js +75 -0
- package/lib/cache/resources/default/guild-based.d.ts +33 -0
- package/lib/cache/resources/default/guild-based.js +91 -0
- package/lib/cache/resources/default/guild-related.d.ts +32 -0
- package/lib/cache/resources/default/guild-related.js +102 -0
- package/lib/cache/resources/emojis.d.ts +7 -0
- package/lib/cache/resources/emojis.js +17 -0
- package/lib/cache/resources/guilds.d.ts +10 -0
- package/lib/cache/resources/guilds.js +117 -0
- package/lib/cache/resources/members.d.ts +10 -0
- package/lib/cache/resources/members.js +41 -0
- package/lib/cache/resources/presence.d.ts +9 -0
- package/lib/cache/resources/presence.js +14 -0
- package/lib/cache/resources/roles.d.ts +7 -0
- package/lib/cache/resources/roles.js +17 -0
- package/lib/cache/resources/stage-instances.d.ts +5 -0
- package/lib/cache/resources/stage-instances.js +8 -0
- package/lib/cache/resources/stickers.d.ts +7 -0
- package/lib/cache/resources/stickers.js +17 -0
- package/lib/cache/resources/threads.d.ts +7 -0
- package/lib/cache/resources/threads.js +17 -0
- package/lib/cache/resources/users.d.ts +7 -0
- package/lib/cache/resources/users.js +17 -0
- package/lib/cache/resources/voice-states.d.ts +9 -0
- package/lib/cache/resources/voice-states.js +13 -0
- package/lib/client/base.d.ts +244 -0
- package/lib/client/base.js +178 -0
- package/lib/client/client.d.ts +32 -0
- package/lib/client/client.js +156 -0
- package/lib/client/httpclient.d.ts +21 -0
- package/lib/client/httpclient.js +143 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +19 -0
- package/lib/client/oninteraction.d.ts +4 -0
- package/lib/client/oninteraction.js +180 -0
- package/lib/client/workerclient.d.ts +28 -0
- package/lib/client/workerclient.js +213 -0
- package/lib/collection.d.ts +233 -0
- package/lib/collection.js +371 -0
- package/lib/commands/applications/chat.d.ts +139 -0
- package/lib/commands/applications/chat.js +173 -0
- package/lib/commands/applications/chatcontext.d.ts +28 -0
- package/lib/commands/applications/chatcontext.js +53 -0
- package/lib/commands/applications/menu.d.ts +39 -0
- package/lib/commands/applications/menu.js +87 -0
- package/lib/commands/applications/menucontext.d.ts +25 -0
- package/lib/commands/applications/menucontext.js +64 -0
- package/lib/commands/applications/options.d.ts +67 -0
- package/lib/commands/applications/options.js +44 -0
- package/lib/commands/applications/shared.d.ts +35 -0
- package/lib/commands/applications/shared.js +2 -0
- package/lib/commands/decorators.d.ts +107 -0
- package/lib/commands/decorators.js +85 -0
- package/lib/commands/handler.d.ts +15 -0
- package/lib/commands/handler.js +140 -0
- package/lib/commands/index.d.ts +8 -0
- package/lib/commands/index.js +24 -0
- package/lib/commands/optionresolver.d.ts +49 -0
- package/lib/commands/optionresolver.js +146 -0
- package/lib/common/bot/watcher.d.ts +53 -0
- package/lib/common/bot/watcher.js +104 -0
- package/lib/common/index.d.ts +13 -0
- package/lib/common/index.js +30 -0
- package/lib/common/it/colors.d.ts +274 -0
- package/lib/common/it/colors.js +453 -0
- package/lib/common/it/constants.d.ts +36 -0
- package/lib/common/it/constants.js +40 -0
- package/lib/common/it/logger.d.ts +114 -0
- package/lib/common/it/logger.js +189 -0
- package/lib/common/it/utils.d.ts +107 -0
- package/lib/common/it/utils.js +275 -0
- package/lib/common/shorters/base.d.ts +5 -0
- package/lib/common/shorters/base.js +10 -0
- package/lib/common/shorters/channels.d.ts +90 -0
- package/lib/common/shorters/channels.js +95 -0
- package/lib/common/shorters/guilds.d.ts +389 -0
- package/lib/common/shorters/guilds.js +350 -0
- package/lib/common/shorters/members.d.ts +115 -0
- package/lib/common/shorters/members.js +179 -0
- package/lib/common/shorters/messages.d.ts +27 -0
- package/lib/common/shorters/messages.js +117 -0
- package/lib/common/shorters/roles.d.ts +12 -0
- package/lib/common/shorters/roles.js +51 -0
- package/lib/common/shorters/templates.d.ts +12 -0
- package/lib/common/shorters/templates.js +29 -0
- package/lib/common/shorters/users.d.ts +11 -0
- package/lib/common/shorters/users.js +42 -0
- package/lib/common/shorters/webhook.d.ts +33 -0
- package/lib/common/shorters/webhook.js +69 -0
- package/lib/common/types/options.d.ts +10 -0
- package/lib/common/types/options.js +2 -0
- package/lib/common/types/resolvables.d.ts +10 -0
- package/lib/common/types/resolvables.js +2 -0
- package/lib/common/types/util.d.ts +90 -0
- package/lib/common/types/util.js +2 -0
- package/lib/common/types/write.d.ts +21 -0
- package/lib/common/types/write.js +2 -0
- package/lib/components/ActionRow.d.ts +10 -0
- package/lib/components/ActionRow.js +13 -0
- package/lib/components/ButtonComponent.d.ts +19 -0
- package/lib/components/ButtonComponent.js +34 -0
- package/lib/components/ChannelSelectMenuComponent.d.ts +6 -0
- package/lib/components/ChannelSelectMenuComponent.js +12 -0
- package/lib/components/MentionableSelectMenuComponent.d.ts +4 -0
- package/lib/components/MentionableSelectMenuComponent.js +7 -0
- package/lib/components/RoleSelectMenuComponent.d.ts +4 -0
- package/lib/components/RoleSelectMenuComponent.js +7 -0
- package/lib/components/StringSelectMenuComponent.d.ts +6 -0
- package/lib/components/StringSelectMenuComponent.js +12 -0
- package/lib/components/TextInputComponent.d.ts +7 -0
- package/lib/components/TextInputComponent.js +14 -0
- package/lib/components/UserSelectMenuComponent.d.ts +4 -0
- package/lib/components/UserSelectMenuComponent.js +7 -0
- package/lib/components/command.d.ts +23 -0
- package/lib/components/command.js +15 -0
- package/lib/components/handler.d.ts +48 -0
- package/lib/components/handler.js +231 -0
- package/lib/components/index.d.ts +20 -0
- package/lib/components/index.js +55 -0
- package/lib/components/listener.d.ts +11 -0
- package/lib/components/listener.js +18 -0
- package/lib/events/event.d.ts +23 -0
- package/lib/events/event.js +2 -0
- package/lib/events/handler.d.ts +19 -0
- package/lib/events/handler.js +112 -0
- package/lib/events/hooks/application_command.d.ts +12 -0
- package/lib/events/hooks/application_command.js +8 -0
- package/lib/events/hooks/auto_moderation.d.ts +22 -0
- package/lib/events/hooks/auto_moderation.js +21 -0
- package/lib/events/hooks/channel.d.ts +11 -0
- package/lib/events/hooks/channel.js +24 -0
- package/lib/events/hooks/custom.d.ts +4 -0
- package/lib/events/hooks/custom.js +11 -0
- package/lib/events/hooks/dispatch.d.ts +5 -0
- package/lib/events/hooks/dispatch.js +12 -0
- package/lib/events/hooks/entitlement.d.ts +35 -0
- package/lib/events/hooks/entitlement.js +16 -0
- package/lib/events/hooks/guild.d.ts +228 -0
- package/lib/events/hooks/guild.js +101 -0
- package/lib/events/hooks/index.d.ts +23 -0
- package/lib/events/hooks/index.js +34 -0
- package/lib/events/hooks/integration.d.ts +94 -0
- package/lib/events/hooks/integration.js +27 -0
- package/lib/events/hooks/interactions.d.ts +4 -0
- package/lib/events/hooks/interactions.js +8 -0
- package/lib/events/hooks/invite.d.ts +21 -0
- package/lib/events/hooks/invite.js +12 -0
- package/lib/events/hooks/message.d.ts +69 -0
- package/lib/events/hooks/message.js +37 -0
- package/lib/events/hooks/presence.d.ts +27 -0
- package/lib/events/hooks/presence.js +8 -0
- package/lib/events/hooks/stage.d.ts +29 -0
- package/lib/events/hooks/stage.js +16 -0
- package/lib/events/hooks/thread.d.ts +198 -0
- package/lib/events/hooks/thread.js +29 -0
- package/lib/events/hooks/typing.d.ts +16 -0
- package/lib/events/hooks/typing.js +14 -0
- package/lib/events/hooks/user.d.ts +4 -0
- package/lib/events/hooks/user.js +8 -0
- package/lib/events/hooks/voice.d.ts +37 -0
- package/lib/events/hooks/voice.js +18 -0
- package/lib/events/hooks/webhook.d.ts +6 -0
- package/lib/events/hooks/webhook.js +8 -0
- package/lib/events/index.d.ts +2 -0
- package/lib/events/index.js +18 -0
- package/lib/index.d.ts +79 -0
- package/lib/index.js +104 -0
- package/lib/langs/handler.d.ts +11 -0
- package/lib/langs/handler.js +34 -0
- package/lib/langs/index.d.ts +2 -0
- package/lib/langs/index.js +18 -0
- package/lib/langs/router.d.ts +18 -0
- package/lib/langs/router.js +42 -0
- package/lib/structures/AnonymousGuild.d.ts +7 -0
- package/lib/structures/AnonymousGuild.js +11 -0
- package/lib/structures/AutoModerationRule.d.ts +22 -0
- package/lib/structures/AutoModerationRule.js +34 -0
- package/lib/structures/ClientUser.d.ts +25 -0
- package/lib/structures/ClientUser.js +52 -0
- package/lib/structures/Guild.d.ts +86 -0
- package/lib/structures/Guild.js +66 -0
- package/lib/structures/GuildEmoji.d.ts +29 -0
- package/lib/structures/GuildEmoji.js +47 -0
- package/lib/structures/GuildMember.d.ts +92 -0
- package/lib/structures/GuildMember.js +137 -0
- package/lib/structures/GuildPreview.d.ts +10 -0
- package/lib/structures/GuildPreview.js +14 -0
- package/lib/structures/GuildRole.d.ts +21 -0
- package/lib/structures/GuildRole.js +32 -0
- package/lib/structures/GuildTemplate.d.ts +23 -0
- package/lib/structures/GuildTemplate.js +36 -0
- package/lib/structures/Interaction.d.ts +152 -0
- package/lib/structures/Interaction.js +409 -0
- package/lib/structures/Message.d.ts +53 -0
- package/lib/structures/Message.js +123 -0
- package/lib/structures/Sticker.d.ts +27 -0
- package/lib/structures/Sticker.js +44 -0
- package/lib/structures/User.d.ts +20 -0
- package/lib/structures/User.js +37 -0
- package/lib/structures/Webhook.d.ts +42 -0
- package/lib/structures/Webhook.js +63 -0
- package/lib/structures/channels.d.ts +232 -0
- package/lib/structures/channels.js +366 -0
- package/lib/structures/extra/Base.d.ts +7 -0
- package/lib/structures/extra/Base.js +39 -0
- package/lib/structures/extra/BaseComponent.d.ts +9 -0
- package/lib/structures/extra/BaseComponent.js +12 -0
- package/lib/structures/extra/BaseGuild.d.ts +40 -0
- package/lib/structures/extra/BaseGuild.js +71 -0
- package/lib/structures/extra/BaseSelectMenuComponent.d.ts +9 -0
- package/lib/structures/extra/BaseSelectMenuComponent.js +13 -0
- package/lib/structures/extra/BitField.d.ts +14 -0
- package/lib/structures/extra/BitField.js +56 -0
- package/lib/structures/extra/DiscordBase.d.ts +18 -0
- package/lib/structures/extra/DiscordBase.js +28 -0
- package/lib/structures/extra/Permissions.d.ts +54 -0
- package/lib/structures/extra/Permissions.js +9 -0
- package/lib/structures/extra/functions.d.ts +11 -0
- package/lib/structures/extra/functions.js +69 -0
- package/lib/structures/index.d.ts +15 -0
- package/lib/structures/index.js +31 -0
- package/lib/websocket/SharedTypes.d.ts +128 -0
- package/lib/websocket/SharedTypes.js +2 -0
- package/lib/websocket/constants/index.d.ts +26 -0
- package/lib/websocket/constants/index.js +31 -0
- package/lib/websocket/discord/basesocket.d.ts +12 -0
- package/lib/websocket/discord/basesocket.js +37 -0
- package/lib/websocket/discord/events/memberUpdate.d.ts +16 -0
- package/lib/websocket/discord/events/memberUpdate.js +47 -0
- package/lib/websocket/discord/events/presenceUpdate.d.ts +24 -0
- package/lib/websocket/discord/events/presenceUpdate.js +46 -0
- package/lib/websocket/discord/handlemessage.d.ts +0 -0
- package/lib/websocket/discord/handlemessage.js +1 -0
- package/lib/websocket/discord/index.d.ts +4 -0
- package/lib/websocket/discord/index.js +20 -0
- package/lib/websocket/discord/memberUpdate.d.ts +16 -0
- package/lib/websocket/discord/memberUpdate.js +47 -0
- package/lib/websocket/discord/shard.d.ts +46 -0
- package/lib/websocket/discord/shard.js +278 -0
- package/lib/websocket/discord/sharder.d.ts +25 -0
- package/lib/websocket/discord/sharder.js +153 -0
- package/lib/websocket/discord/shared.d.ts +99 -0
- package/lib/websocket/discord/shared.js +8 -0
- package/lib/websocket/discord/worker.d.ts +43 -0
- package/lib/websocket/discord/worker.js +2 -0
- package/lib/websocket/discord/workermanager.d.ts +69 -0
- package/lib/websocket/discord/workermanager.js +273 -0
- package/lib/websocket/index.d.ts +3 -0
- package/lib/websocket/index.js +19 -0
- package/lib/websocket/structures/index.d.ts +117 -0
- package/lib/websocket/structures/index.js +261 -0
- package/lib/websocket/structures/timeout.d.ts +20 -0
- package/lib/websocket/structures/timeout.js +75 -0
- package/package.json +70 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { RESTDeleteAPIChannelAllMessageReactionsResult, RESTDeleteAPIChannelMessageReactionResult, RESTDeleteAPIChannelMessageResult, RESTDeleteAPIChannelPermissionResult, RESTDeleteAPIChannelPinResult, RESTDeleteAPIChannelRecipientResult, RESTDeleteAPIChannelResult, RESTDeleteAPIChannelThreadMembersResult, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTGetAPIChannelMessageResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTGetAPIChannelResult, RESTGetAPIChannelThreadMemberQuery, RESTGetAPIChannelThreadMemberResult, RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersResult, RESTGetAPIChannelThreadsArchivedPrivateResult, RESTGetAPIChannelThreadsArchivedPublicResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIGuildWebhooksResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageResult, RESTPatchAPIChannelResult, RESTPostAPIChannelFollowersJSONBody, RESTPostAPIChannelFollowersResult, RESTPostAPIChannelInviteJSONBody, RESTPostAPIChannelInviteResult, RESTPostAPIChannelMessageCrosspostResult, RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageResult, RESTPostAPIChannelMessagesBulkDeleteJSONBody, RESTPostAPIChannelMessagesBulkDeleteResult, RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIChannelTypingResult, RESTPostAPIChannelWebhookJSONBody, RESTPostAPIChannelWebhookResult, RESTPostAPIGuildForumThreadsJSONBody, RESTPutAPIChannelMessageReactionResult, RESTPutAPIChannelPermissionJSONBody, RESTPutAPIChannelPermissionResult, RESTPutAPIChannelPinResult, RESTPutAPIChannelRecipientJSONBody, RESTPutAPIChannelRecipientResult, RESTPutAPIChannelThreadMembersResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface ChannelRoutes {
|
|
5
|
+
channels(id: string): {
|
|
6
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIChannelResult>;
|
|
7
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIChannelJSONBody>): Promise<RESTPatchAPIChannelResult>;
|
|
8
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelResult>;
|
|
9
|
+
users: {
|
|
10
|
+
(id: '@me'): {
|
|
11
|
+
threads: {
|
|
12
|
+
archived: {
|
|
13
|
+
private: {
|
|
14
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelThreadsArchivedQuery>): Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
'thread-members': {
|
|
21
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelThreadMembersQuery>): Promise<RESTGetAPIChannelThreadMembersResult>;
|
|
22
|
+
(id: '@me'): {
|
|
23
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIChannelThreadMembersResult>;
|
|
24
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelThreadMembersResult>;
|
|
25
|
+
};
|
|
26
|
+
(id: string): {
|
|
27
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelThreadMemberQuery>): Promise<RESTGetAPIChannelThreadMemberResult>;
|
|
28
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIChannelThreadMembersResult>;
|
|
29
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelThreadMembersResult>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
threads: {
|
|
33
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelThreadsJSONBody | RESTPostAPIGuildForumThreadsJSONBody>): Promise<RESTPostAPIChannelThreadsResult>;
|
|
34
|
+
archived: {
|
|
35
|
+
public: {
|
|
36
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelThreadsArchivedQuery>): Promise<RESTGetAPIChannelThreadsArchivedPublicResult>;
|
|
37
|
+
};
|
|
38
|
+
private: {
|
|
39
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelThreadsArchivedQuery>): Promise<RESTGetAPIChannelThreadsArchivedPrivateResult>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
recipients: {
|
|
44
|
+
(id: string): {
|
|
45
|
+
put(args?: RestArguments<ProxyRequestMethod.Put, RESTPutAPIChannelRecipientJSONBody>): Promise<RESTPutAPIChannelRecipientResult>;
|
|
46
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelRecipientResult>;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
pins: {
|
|
50
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIChannelPinsResult>;
|
|
51
|
+
(id: string): {
|
|
52
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIChannelPinResult>;
|
|
53
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelPinResult>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
followers: {
|
|
57
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelFollowersJSONBody>): Promise<RESTPostAPIChannelFollowersResult>;
|
|
58
|
+
};
|
|
59
|
+
permissions: {
|
|
60
|
+
(id: string): {
|
|
61
|
+
put(args?: RestArguments<ProxyRequestMethod.Put, RESTPutAPIChannelPermissionJSONBody>): Promise<RESTPutAPIChannelPermissionResult>;
|
|
62
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelPermissionResult>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
invites: {
|
|
66
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIChannelInvitesResult>;
|
|
67
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelInviteJSONBody>): Promise<RESTPostAPIChannelInviteResult>;
|
|
68
|
+
};
|
|
69
|
+
messages: {
|
|
70
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelMessagesQuery>): Promise<RESTGetAPIChannelMessagesResult>;
|
|
71
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelMessageJSONBody>): Promise<RESTPostAPIChannelMessageResult>;
|
|
72
|
+
'bulk-delete': {
|
|
73
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelMessagesBulkDeleteJSONBody>): Promise<RESTPostAPIChannelMessagesBulkDeleteResult>;
|
|
74
|
+
};
|
|
75
|
+
(id: string): {
|
|
76
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIChannelMessageResult>;
|
|
77
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIChannelMessageJSONBody>): Promise<RESTPatchAPIChannelMessageResult>;
|
|
78
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelMessageResult>;
|
|
79
|
+
threads: {
|
|
80
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelMessagesThreadsJSONBody>): Promise<RESTPostAPIChannelMessagesThreadsResult>;
|
|
81
|
+
};
|
|
82
|
+
crosspost: {
|
|
83
|
+
post(args: RestArguments<ProxyRequestMethod.Post>): Promise<RESTPostAPIChannelMessageCrosspostResult>;
|
|
84
|
+
};
|
|
85
|
+
reactions: {
|
|
86
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelAllMessageReactionsResult>;
|
|
87
|
+
(emoji: string): {
|
|
88
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIChannelMessageReactionUsersQuery>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
|
|
89
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelMessageReactionResult>;
|
|
90
|
+
(id: '@me'): {
|
|
91
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIChannelMessageReactionResult>;
|
|
92
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelMessageReactionResult>;
|
|
93
|
+
};
|
|
94
|
+
(id: string): {
|
|
95
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIChannelMessageReactionResult>;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
typing: {
|
|
102
|
+
post(args?: RestArguments<ProxyRequestMethod.Post>): Promise<RESTPostAPIChannelTypingResult>;
|
|
103
|
+
};
|
|
104
|
+
webhooks: {
|
|
105
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildWebhooksResult>;
|
|
106
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIChannelWebhookJSONBody>): Promise<RESTPostAPIChannelWebhookResult>;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RESTGetAPIGatewayBotResult, RESTGetAPIGatewayResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface GatewayRoutes {
|
|
5
|
+
gateway: {
|
|
6
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGatewayResult>;
|
|
7
|
+
bot: {
|
|
8
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGatewayBotResult>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { APIThreadChannel, Identify, OmitInsert, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, RESTPostAPIGuildTemplatesJSONBody, RESTPostAPIGuildTemplatesResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildBanResult, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildMemberRoleResult, RESTPutAPIGuildTemplateSyncResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
import type { RawFile } from '../shared';
|
|
5
|
+
export interface GuildRoutes {
|
|
6
|
+
guilds: {
|
|
7
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildsJSONBody>): Promise<RESTPostAPIGuildsResult>;
|
|
8
|
+
templates(code: string): {
|
|
9
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPITemplateResult>;
|
|
10
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPITemplateCreateGuildJSONBody>): Promise<RESTPostAPITemplateCreateGuildResult>;
|
|
11
|
+
};
|
|
12
|
+
(id: string): {
|
|
13
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildQuery>): Promise<RESTGetAPIGuildResult>;
|
|
14
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildJSONBody>): Promise<RESTPatchAPIGuildResult>;
|
|
15
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildResult>;
|
|
16
|
+
webhooks: {
|
|
17
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildWebhooksResult>;
|
|
18
|
+
};
|
|
19
|
+
preview: {
|
|
20
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildPreviewResult>;
|
|
21
|
+
};
|
|
22
|
+
'audit-logs': {
|
|
23
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIAuditLogQuery>): Promise<RESTGetAPIAuditLogResult>;
|
|
24
|
+
};
|
|
25
|
+
'auto-moderation': {
|
|
26
|
+
rules: {
|
|
27
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIAutoModerationRulesResult>;
|
|
28
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIAutoModerationRuleJSONBody>): Promise<RESTPostAPIAutoModerationRuleResult>;
|
|
29
|
+
(id: string): {
|
|
30
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIAutoModerationRuleResult>;
|
|
31
|
+
patch(args: RestArguments<ProxyRequestMethod.Post, RESTPatchAPIAutoModerationRuleJSONBody>): Promise<RESTPatchAPIAutoModerationRuleResult>;
|
|
32
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIAutoModerationRuleResult>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
channels: {
|
|
37
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildChannelsResult>;
|
|
38
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildChannelJSONBody>): Promise<RESTPostAPIGuildChannelResult>;
|
|
39
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildChannelPositionsJSONBody>): Promise<RESTPatchAPIGuildChannelPositionsResult>;
|
|
40
|
+
};
|
|
41
|
+
members: {
|
|
42
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildMembersQuery>): Promise<RESTGetAPIGuildMembersResult>;
|
|
43
|
+
search: {
|
|
44
|
+
get(args: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildMembersSearchQuery>): Promise<RESTGetAPIGuildMembersSearchResult>;
|
|
45
|
+
};
|
|
46
|
+
'@me': {
|
|
47
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPICurrentGuildMemberJSONBody>): Promise<RESTGetAPIGuildMemberResult>;
|
|
48
|
+
};
|
|
49
|
+
(id: string): {
|
|
50
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildMemberResult>;
|
|
51
|
+
put(args?: RestArguments<ProxyRequestMethod.Put, RESTPutAPIGuildMemberJSONBody>): Promise<RESTPutAPIGuildMemberResult>;
|
|
52
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildMemberJSONBody>): Promise<RESTPatchAPIGuildMemberResult>;
|
|
53
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildMemberResult>;
|
|
54
|
+
roles(id: string): {
|
|
55
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIGuildMemberRoleResult>;
|
|
56
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildMemberRoleResult>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
threads: {
|
|
61
|
+
active: {
|
|
62
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<Identify<RESTGetAPIGuildThreadsResult & {
|
|
63
|
+
threads: Partial<APIThreadChannel>;
|
|
64
|
+
}>>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
roles: {
|
|
68
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildRolesResult>;
|
|
69
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildRoleJSONBody>): Promise<RESTPostAPIGuildRoleResult>;
|
|
70
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildRolePositionsJSONBody>): Promise<RESTPatchAPIGuildRolePositionsResult>;
|
|
71
|
+
(id: string): {
|
|
72
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildRoleJSONBody>): Promise<RESTPatchAPIGuildRoleResult>;
|
|
73
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildRoleResult>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
bans: {
|
|
77
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildBansQuery>): Promise<RESTGetAPIGuildBansResult>;
|
|
78
|
+
(userId: string): {
|
|
79
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildBanResult>;
|
|
80
|
+
put(args?: RestArguments<ProxyRequestMethod.Put, RESTPutAPIGuildBanJSONBody>): Promise<RESTPutAPIGuildBanResult>;
|
|
81
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildBanResult>;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
mfa: {
|
|
85
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildsMFAJSONBody>): Promise<RESTPostAPIGuildsMFAResult>;
|
|
86
|
+
};
|
|
87
|
+
prune: {
|
|
88
|
+
get(args: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildPruneCountQuery>): Promise<RESTGetAPIGuildPruneCountResult>;
|
|
89
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildPruneJSONBody>): Promise<RESTPostAPIGuildPruneResult>;
|
|
90
|
+
};
|
|
91
|
+
regions: {
|
|
92
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildVoiceRegionsResult>;
|
|
93
|
+
};
|
|
94
|
+
invites: {
|
|
95
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildInvitesResult>;
|
|
96
|
+
};
|
|
97
|
+
widget: {
|
|
98
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildWidgetSettingsResult>;
|
|
99
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildWidgetSettingsJSONBody>): Promise<RESTPatchAPIGuildWidgetSettingsResult>;
|
|
100
|
+
};
|
|
101
|
+
'widget.json': {
|
|
102
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildWidgetJSONResult>;
|
|
103
|
+
};
|
|
104
|
+
'widget.png': {
|
|
105
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildWidgetImageQuery>): Promise<RESTGetAPIGuildWidgetImageResult>;
|
|
106
|
+
};
|
|
107
|
+
integrations: {
|
|
108
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildIntegrationsResult>;
|
|
109
|
+
(id: string): {
|
|
110
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildIntegrationResult>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
'vanity-url': {
|
|
114
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildVanityUrlResult>;
|
|
115
|
+
};
|
|
116
|
+
'welcome-screen': {
|
|
117
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildWelcomeScreenResult>;
|
|
118
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildWelcomeScreenJSONBody>): Promise<RESTPatchAPIGuildWelcomeScreenResult>;
|
|
119
|
+
};
|
|
120
|
+
emojis: {
|
|
121
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildEmojisResult>;
|
|
122
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildEmojiJSONBody>): Promise<RESTPostAPIGuildEmojiResult>;
|
|
123
|
+
(id: string): {
|
|
124
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildEmojiResult>;
|
|
125
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildEmojiJSONBody>): Promise<RESTPatchAPIGuildEmojiResult>;
|
|
126
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildEmojiResult>;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
'voice-states': {
|
|
130
|
+
'@me': {
|
|
131
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody>): Promise<RESTPatchAPIGuildVoiceStateCurrentMemberResult>;
|
|
132
|
+
};
|
|
133
|
+
(id: string): {
|
|
134
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildVoiceStateUserJSONBody>): Promise<RESTPatchAPIGuildVoiceStateUserResult>;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
stickers: {
|
|
138
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildStickersResult>;
|
|
139
|
+
post(args: RestArguments<ProxyRequestMethod.Post, Omit<RESTPostAPIGuildStickerFormDataBody, 'file'>, {}, OmitInsert<RawFile, 'key', {
|
|
140
|
+
key: 'file';
|
|
141
|
+
}>[]>): Promise<RESTPostAPIGuildStickerResult>;
|
|
142
|
+
(id: string): {
|
|
143
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildStickerResult>;
|
|
144
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildStickerJSONBody>): Promise<RESTPatchAPIGuildStickerResult>;
|
|
145
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildStickerResult>;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
'scheduled-events': {
|
|
149
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildScheduledEventsQuery>): Promise<RESTGetAPIGuildScheduledEventsResult>;
|
|
150
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildScheduledEventJSONBody>): Promise<RESTPostAPIGuildScheduledEventResult>;
|
|
151
|
+
(id: string): {
|
|
152
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildScheduledEventQuery>): Promise<RESTGetAPIGuildScheduledEventResult>;
|
|
153
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildScheduledEventJSONBody>): Promise<RESTPatchAPIGuildScheduledEventResult>;
|
|
154
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildScheduledEventResult>;
|
|
155
|
+
users: {
|
|
156
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIGuildScheduledEventUsersQuery>): Promise<RESTGetAPIGuildScheduledEventUsersResult>;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
templates: {
|
|
161
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIGuildTemplatesResult>;
|
|
162
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIGuildTemplatesJSONBody>): Promise<RESTPostAPIGuildTemplatesResult>;
|
|
163
|
+
(code: string): {
|
|
164
|
+
put(args?: RestArguments<ProxyRequestMethod.Put>): Promise<RESTPutAPIGuildTemplateSyncResult>;
|
|
165
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIGuildTemplateJSONBody>): Promise<RESTPatchAPIGuildTemplateResult>;
|
|
166
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildTemplateResult>;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ApplicationRoutes } from './applications';
|
|
2
|
+
import type { ChannelRoutes } from './channels';
|
|
3
|
+
import type { GatewayRoutes } from './gateway';
|
|
4
|
+
import type { GuildRoutes } from './guilds';
|
|
5
|
+
import type { InteractionRoutes } from './interactions';
|
|
6
|
+
import type { InviteRoutes } from './invites';
|
|
7
|
+
import type { StageInstanceRoutes } from './stage-instances';
|
|
8
|
+
import type { StickerRoutes } from './stickers';
|
|
9
|
+
import type { UserRoutes } from './users';
|
|
10
|
+
import type { VoiceRoutes } from './voice';
|
|
11
|
+
import type { WebhookRoutes } from './webhooks';
|
|
12
|
+
export * from './cdn';
|
|
13
|
+
export type APIRoutes = ApplicationRoutes & ChannelRoutes & GatewayRoutes & GuildRoutes & InteractionRoutes & InviteRoutes & StageInstanceRoutes & StickerRoutes & UserRoutes & VoiceRoutes & WebhookRoutes;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cdn"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RESTPostAPIInteractionCallbackJSONBody } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface InteractionRoutes {
|
|
5
|
+
interactions: {
|
|
6
|
+
(id: string): {
|
|
7
|
+
(token: string): {
|
|
8
|
+
callback: {
|
|
9
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIInteractionCallbackJSONBody>): Promise<never>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RESTDeleteAPIInviteResult, RESTGetAPIInviteQuery, RESTGetAPIInviteResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface InviteRoutes {
|
|
5
|
+
invites(id: string): {
|
|
6
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPIInviteQuery>): Promise<RESTGetAPIInviteResult>;
|
|
7
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIInviteResult>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RESTDeleteAPIStageInstanceResult, RESTGetAPIStageInstanceResult, RESTPatchAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceResult, RESTPostAPIStageInstanceJSONBody, RESTPostAPIStageInstanceResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface StageInstanceRoutes {
|
|
5
|
+
'stage-instances': {
|
|
6
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIStageInstanceJSONBody>): Promise<RESTPostAPIStageInstanceResult>;
|
|
7
|
+
(id: string): {
|
|
8
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIStageInstanceResult>;
|
|
9
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIStageInstanceJSONBody>): Promise<RESTPatchAPIStageInstanceResult>;
|
|
10
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIStageInstanceResult>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RESTGetAPIStickerResult, RESTGetNitroStickerPacksResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface StickerRoutes {
|
|
5
|
+
stickers(id: string): {
|
|
6
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIStickerResult>;
|
|
7
|
+
};
|
|
8
|
+
'sticker-packs': {
|
|
9
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetNitroStickerPacksResult>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { APIDMChannel, RESTDeleteAPIGuildResult, RESTGetAPICurrentUserApplicationRoleConnectionResult, RESTGetAPICurrentUserConnectionsResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTGetAPICurrentUserResult, RESTGetAPIUserResult, RESTGetCurrentUserGuildMemberResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentUserResult, RESTPostAPICurrentUserCreateDMChannelJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTPutAPICurrentUserApplicationRoleConnectionResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface UserRoutes {
|
|
5
|
+
users: {
|
|
6
|
+
(id: string): {
|
|
7
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIUserResult>;
|
|
8
|
+
};
|
|
9
|
+
(id: '@me'): {
|
|
10
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPICurrentUserResult>;
|
|
11
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPICurrentUserJSONBody>): Promise<RESTPatchAPICurrentUserResult>;
|
|
12
|
+
guilds: {
|
|
13
|
+
get(args?: RestArguments<ProxyRequestMethod.Get, RESTGetAPICurrentUserGuildsQuery>): Promise<RESTGetAPICurrentUserGuildsResult>;
|
|
14
|
+
(id: string): {
|
|
15
|
+
member: {
|
|
16
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetCurrentUserGuildMemberResult>;
|
|
17
|
+
};
|
|
18
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIGuildResult>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
channels: {
|
|
22
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPICurrentUserCreateDMChannelJSONBody>): Promise<APIDMChannel>;
|
|
23
|
+
};
|
|
24
|
+
connections: {
|
|
25
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPICurrentUserConnectionsResult>;
|
|
26
|
+
};
|
|
27
|
+
applications(applicationId: string): {
|
|
28
|
+
'role-connection': {
|
|
29
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPICurrentUserApplicationRoleConnectionResult>;
|
|
30
|
+
put(args: RestArguments<ProxyRequestMethod.Put, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody>): Promise<RESTPutAPICurrentUserApplicationRoleConnectionResult>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RESTGetAPIVoiceRegionsResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface VoiceRoutes {
|
|
5
|
+
voice: {
|
|
6
|
+
region: {
|
|
7
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIVoiceRegionsResult>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RESTDeleteAPIWebhookResult, RESTDeleteAPIWebhookWithTokenMessageResult, RESTDeleteAPIWebhookWithTokenResult, RESTGetAPIWebhookResult, RESTGetAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenResult, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookResult, RESTPatchAPIWebhookWithTokenJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenGitHubQuery, RESTPostAPIWebhookWithTokenGitHubResult, RESTPostAPIWebhookWithTokenGitHubWaitResult, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenSlackResult, RESTPostAPIWebhookWithTokenSlackWaitResult, RESTPostAPIWebhookWithTokenWaitResult } from '../../common';
|
|
2
|
+
import type { RestArguments } from '../REST';
|
|
3
|
+
import type { ProxyRequestMethod } from '../Router';
|
|
4
|
+
export interface WebhookRoutes {
|
|
5
|
+
webhooks(id: string): {
|
|
6
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIWebhookResult>;
|
|
7
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIWebhookJSONBody>): Promise<RESTPatchAPIWebhookResult>;
|
|
8
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIWebhookResult>;
|
|
9
|
+
(token: string): {
|
|
10
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIWebhookWithTokenResult>;
|
|
11
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIWebhookWithTokenJSONBody>): Promise<RESTPatchAPIWebhookWithTokenResult>;
|
|
12
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIWebhookWithTokenResult>;
|
|
13
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery>): Promise<RESTPostAPIWebhookWithTokenResult | RESTPostAPIWebhookWithTokenWaitResult>;
|
|
14
|
+
slack: {
|
|
15
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenSlackQuery>): Promise<RESTPostAPIWebhookWithTokenSlackResult | RESTPostAPIWebhookWithTokenSlackWaitResult>;
|
|
16
|
+
};
|
|
17
|
+
github: {
|
|
18
|
+
post(args: RestArguments<ProxyRequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenGitHubQuery>): Promise<RESTPostAPIWebhookWithTokenGitHubResult | RESTPostAPIWebhookWithTokenGitHubWaitResult>;
|
|
19
|
+
};
|
|
20
|
+
messages: {
|
|
21
|
+
(id: string | '@original'): {
|
|
22
|
+
get(args?: RestArguments<ProxyRequestMethod.Get>): Promise<RESTGetAPIWebhookWithTokenMessageResult>;
|
|
23
|
+
patch(args: RestArguments<ProxyRequestMethod.Patch, RESTPatchAPIWebhookWithTokenMessageJSONBody>): Promise<RESTPatchAPIWebhookWithTokenMessageResult>;
|
|
24
|
+
delete(args?: RestArguments<ProxyRequestMethod.Delete>): Promise<RESTDeleteAPIWebhookWithTokenMessageResult>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { InternalRequest, RawFile } from '../utils/types.js';
|
|
2
|
+
interface DiscordErrorFieldInformation {
|
|
3
|
+
code: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
interface DiscordErrorGroupWrapper {
|
|
7
|
+
_errors: DiscordError[];
|
|
8
|
+
}
|
|
9
|
+
type DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | {
|
|
10
|
+
[k: string]: DiscordError;
|
|
11
|
+
};
|
|
12
|
+
export interface DiscordErrorData {
|
|
13
|
+
code: number;
|
|
14
|
+
errors?: DiscordError;
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OAuthErrorData {
|
|
18
|
+
error: string;
|
|
19
|
+
error_description?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RequestBody {
|
|
22
|
+
files: RawFile[] | undefined;
|
|
23
|
+
json: unknown | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Represents an API error returned by Discord
|
|
27
|
+
*/
|
|
28
|
+
export declare class DiscordAPIError extends Error {
|
|
29
|
+
rawError: DiscordErrorData | OAuthErrorData;
|
|
30
|
+
code: number | string;
|
|
31
|
+
status: number;
|
|
32
|
+
method: string;
|
|
33
|
+
url: string;
|
|
34
|
+
requestBody: RequestBody;
|
|
35
|
+
/**
|
|
36
|
+
* @param rawError - The error reported by Discord
|
|
37
|
+
* @param code - The error code reported by Discord
|
|
38
|
+
* @param status - The status code of the response
|
|
39
|
+
* @param method - The method of the request that erred
|
|
40
|
+
* @param url - The url of the request that erred
|
|
41
|
+
* @param bodyData - The unparsed data for the request that errored
|
|
42
|
+
*/
|
|
43
|
+
constructor(rawError: DiscordErrorData | OAuthErrorData, code: number | string, status: number, method: string, url: string, bodyData: Pick<InternalRequest, 'body' | 'files'>);
|
|
44
|
+
/**
|
|
45
|
+
* The name of the error
|
|
46
|
+
*/
|
|
47
|
+
get name(): string;
|
|
48
|
+
private static getMessage;
|
|
49
|
+
private static flattenDiscordError;
|
|
50
|
+
}
|
|
51
|
+
export {};
|