disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.a714eda
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/dist/lib/Client.d.ts +291 -254
- package/dist/lib/Client.js +554 -460
- package/dist/lib/constants.d.ts +29 -21
- package/dist/lib/constants.js +33 -24
- package/dist/lib/gateway/Shard.d.ts +5 -3
- package/dist/lib/gateway/Shard.js +183 -120
- package/dist/lib/index.d.ts +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/lib/rest/Endpoints.d.ts +95 -91
- package/dist/lib/rest/Endpoints.js +111 -102
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.js +14 -6
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.d.ts +13 -3
- package/dist/lib/transformers/Components.js +283 -156
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +300 -55
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +36 -50
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +8 -8
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +14 -9
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +478 -0
- package/dist/lib/types/components.js +2 -0
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +203 -130
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +40 -22
- package/dist/lib/types/interaction.d.ts +35 -18
- package/dist/lib/types/invite.d.ts +5 -2
- package/dist/lib/types/lobby.d.ts +31 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message-components.d.ts +334 -118
- package/dist/lib/types/message.d.ts +30 -18
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +8 -5
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/formatters.d.ts +7 -7
- package/dist/lib/utils/formatters.js +19 -19
- package/dist/package.json +4 -4
- package/package.json +4 -4
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import type { snowflake } from "../types/common";
|
|
2
|
-
export declare const guild: (
|
|
2
|
+
export declare const guild: (guildId: snowflake) => `guilds/${string}`;
|
|
3
3
|
export declare const guilds: () => "guilds";
|
|
4
|
-
export declare const guildActiveThreads: (
|
|
5
|
-
export declare const guildAuditLog: (
|
|
6
|
-
export declare const guildAutoModerationRule: (
|
|
7
|
-
export declare const guildAutoModerationRules: (
|
|
8
|
-
export declare const guildBan: (
|
|
9
|
-
export declare const guildBans: (
|
|
10
|
-
export declare const guildBulkBan: (
|
|
11
|
-
export declare const guildChannels: (
|
|
12
|
-
export declare const guildMemberNickname: (
|
|
13
|
-
export declare const guildEmoji: (
|
|
14
|
-
export declare const guildEmojis: (
|
|
15
|
-
export declare const guildIncidentsActions: (
|
|
16
|
-
export declare const guildIntegration: (
|
|
17
|
-
export declare const guildIntegrations: (
|
|
18
|
-
export declare const guildInvites: (
|
|
19
|
-
export declare const guildMFA: (
|
|
20
|
-
export declare const guildMember: (
|
|
21
|
-
export declare const guildMemberRole: (
|
|
22
|
-
export declare const guildMembers: (
|
|
23
|
-
export declare const guildMembersSearch: (
|
|
24
|
-
export declare const guildMemberVerification: (
|
|
25
|
-
export declare const guildOnboarding: (
|
|
26
|
-
export declare const guildPreview: (
|
|
27
|
-
export declare const guildPrune: (
|
|
28
|
-
export declare const guildRole: (
|
|
29
|
-
export declare const guildRoles: (
|
|
30
|
-
export declare const guildScheduledEvent: (
|
|
31
|
-
export declare const guildScheduledEvents: (
|
|
32
|
-
export declare const guildScheduledEventUsers: (
|
|
33
|
-
export declare const guildSoundboardSound: (
|
|
34
|
-
export declare const guildSoundboardSounds: (
|
|
35
|
-
export declare const guildSticker: (
|
|
36
|
-
export declare const guildStickers: (
|
|
37
|
-
export declare const guildTemplate: (
|
|
38
|
-
export declare const guildTemplates: (
|
|
39
|
-
export declare const guildVanityURL: (
|
|
40
|
-
export declare const guildVoiceRegions: (
|
|
41
|
-
export declare const guildVoiceState: (
|
|
42
|
-
export declare const guildWebhooks: (
|
|
43
|
-
export declare const guildWelcomeScreen: (
|
|
44
|
-
export declare const guildWidgetImage: (
|
|
45
|
-
export declare const guildWidgetJSON: (
|
|
46
|
-
export declare const guildWidgetSettings: (
|
|
4
|
+
export declare const guildActiveThreads: (guildId: snowflake) => `guilds/${string}/threads/active`;
|
|
5
|
+
export declare const guildAuditLog: (guildId: snowflake) => `guilds/${string}/audit-logs`;
|
|
6
|
+
export declare const guildAutoModerationRule: (guildId: snowflake, ruleId: snowflake) => `guilds/${string}/auto-moderation/rules/${string}`;
|
|
7
|
+
export declare const guildAutoModerationRules: (guildId: snowflake) => `guilds/${string}/auto-moderation/rules`;
|
|
8
|
+
export declare const guildBan: (guildId: snowflake, userId: snowflake) => `guilds/${string}/bans/${string}`;
|
|
9
|
+
export declare const guildBans: (guildId: snowflake) => `guilds/${string}/bans`;
|
|
10
|
+
export declare const guildBulkBan: (guildId: snowflake) => `guilds/${string}/bulk-ban`;
|
|
11
|
+
export declare const guildChannels: (guildId: snowflake) => `guilds/${string}/channels`;
|
|
12
|
+
export declare const guildMemberNickname: (guildId: snowflake) => `guilds/${string}/members/@me/nick`;
|
|
13
|
+
export declare const guildEmoji: (guildId: snowflake, emojiId: snowflake) => `guilds/${string}/emojis/${string}`;
|
|
14
|
+
export declare const guildEmojis: (guildId: snowflake) => `guilds/${string}/emojis`;
|
|
15
|
+
export declare const guildIncidentsActions: (guildId: snowflake) => `guilds/${string}/incidents-actions`;
|
|
16
|
+
export declare const guildIntegration: (guildId: snowflake, integrationId: snowflake) => `guilds/${string}/integrations/${string}`;
|
|
17
|
+
export declare const guildIntegrations: (guildId: snowflake) => `guilds/${string}/integrations`;
|
|
18
|
+
export declare const guildInvites: (guildId: snowflake) => `guilds/${string}/invites`;
|
|
19
|
+
export declare const guildMFA: (guildId: snowflake) => `guilds/${string}/mfa`;
|
|
20
|
+
export declare const guildMember: (guildId: snowflake, userId?: snowflake | "@me") => `guilds/${string}/members/${string}`;
|
|
21
|
+
export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake, roleId: snowflake) => `guilds/${string}/members/${string}/roles/${string}`;
|
|
22
|
+
export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
|
|
23
|
+
export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
|
|
24
|
+
export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
|
|
25
|
+
export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
|
|
26
|
+
export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
|
|
27
|
+
export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
|
|
28
|
+
export declare const guildRole: (guildId: snowflake, roleId: snowflake) => `guilds/${string}/roles/${string}`;
|
|
29
|
+
export declare const guildRoles: (guildId: snowflake) => `guilds/${string}/roles`;
|
|
30
|
+
export declare const guildScheduledEvent: (guildId: snowflake, guildScheduledEventId: snowflake) => `guilds/${string}/scheduled-events/${string}`;
|
|
31
|
+
export declare const guildScheduledEvents: (guildId: snowflake) => `guilds/${string}/scheduled-events`;
|
|
32
|
+
export declare const guildScheduledEventUsers: (guildId: snowflake, guildScheduledEventId: snowflake) => `guilds/${string}/scheduled-events/${string}/users`;
|
|
33
|
+
export declare const guildSoundboardSound: (guildId: snowflake, soundId: snowflake) => `guilds/${string}/soundboard-sounds/${string}`;
|
|
34
|
+
export declare const guildSoundboardSounds: (guildId: snowflake) => `guilds/${string}/soundboard-sounds`;
|
|
35
|
+
export declare const guildSticker: (guildId: snowflake, stickerId: snowflake) => `guilds/${string}/stickers/${string}`;
|
|
36
|
+
export declare const guildStickers: (guildId: snowflake) => `guilds/${string}/stickers`;
|
|
37
|
+
export declare const guildTemplate: (guildId: snowflake, code: string) => `guilds/${string}/templates/${string}`;
|
|
38
|
+
export declare const guildTemplates: (guildId: snowflake) => `guilds/${string}/templates`;
|
|
39
|
+
export declare const guildVanityURL: (guildId: snowflake) => `guilds/${string}/vanity-url`;
|
|
40
|
+
export declare const guildVoiceRegions: (guildId: snowflake) => `guilds/${string}/regions`;
|
|
41
|
+
export declare const guildVoiceState: (guildId: snowflake, userId?: snowflake | "@me") => `guilds/${string}/voice-states/${string}`;
|
|
42
|
+
export declare const guildWebhooks: (guildId: snowflake) => `guilds/${string}/webhooks`;
|
|
43
|
+
export declare const guildWelcomeScreen: (guildId: snowflake) => `guilds/${string}/welcome-screen`;
|
|
44
|
+
export declare const guildWidgetImage: (guildId: snowflake) => `guilds/${string}/widget.png`;
|
|
45
|
+
export declare const guildWidgetJSON: (guildId: snowflake) => `guilds/${string}/widget.json`;
|
|
46
|
+
export declare const guildWidgetSettings: (guildId: snowflake) => `guilds/${string}/widget`;
|
|
47
47
|
export declare const template: (code: string) => `guilds/templates/${string}`;
|
|
48
|
-
export declare const channel: (
|
|
49
|
-
export declare const channelBulkDelete: (
|
|
50
|
-
export declare const channelFollowers: (
|
|
51
|
-
export declare const channelInvites: (
|
|
52
|
-
export declare const channelMessage: (
|
|
53
|
-
export declare const channelMessageAllReactions: (
|
|
54
|
-
export declare const channelMessageCrosspost: (
|
|
55
|
-
export declare const channelMessageReaction: (
|
|
56
|
-
export declare const channelMessages: (
|
|
57
|
-
export declare const channelPermission: (
|
|
58
|
-
export declare const channelPin: (
|
|
59
|
-
export declare const channelPins: (
|
|
60
|
-
export declare const channelRecipient: (
|
|
61
|
-
export declare const channelThreads: (
|
|
62
|
-
export declare const channelTyping: (
|
|
63
|
-
export declare const channelWebhooks: (
|
|
64
|
-
export declare const threads: (
|
|
65
|
-
export declare const threadMembers: (
|
|
66
|
-
export declare const pollAnswerVoters: (
|
|
67
|
-
export declare const pollExpire: (
|
|
68
|
-
export declare const user: (
|
|
69
|
-
export declare const userApplicationRoleConnection: (
|
|
48
|
+
export declare const channel: (channelId: snowflake) => `channels/${string}`;
|
|
49
|
+
export declare const channelBulkDelete: (channelId: snowflake) => `channels/${string}/messages/bulk-delete`;
|
|
50
|
+
export declare const channelFollowers: (channelId: snowflake) => `channels/${string}/followers`;
|
|
51
|
+
export declare const channelInvites: (channelId: snowflake) => `channels/${string}/invites`;
|
|
52
|
+
export declare const channelMessage: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/${string}`;
|
|
53
|
+
export declare const channelMessageAllReactions: (channelId: snowflake, messageId: snowflake, emoji?: string) => `channels/${string}/messages/${string}/reactions/${string}` | `channels/${string}/messages/${string}/reactions`;
|
|
54
|
+
export declare const channelMessageCrosspost: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/${string}/crosspost`;
|
|
55
|
+
export declare const channelMessageReaction: (channelId: snowflake, messageId: snowflake, emoji: string, userId?: snowflake | "@me") => `channels/${string}/messages/${string}/reactions/${string}/${string}`;
|
|
56
|
+
export declare const channelMessages: (channelId: snowflake) => `channels/${string}/messages`;
|
|
57
|
+
export declare const channelPermission: (channelId: snowflake, overwriteId: snowflake) => `channels/${string}/permissions/${string}`;
|
|
58
|
+
export declare const channelPin: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/pins/${string}`;
|
|
59
|
+
export declare const channelPins: (channelId: snowflake) => `channels/${string}/messages/pins`;
|
|
60
|
+
export declare const channelRecipient: (channelId: snowflake, userId: snowflake) => `channels/${string}/recipients/${string}`;
|
|
61
|
+
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/private` | `channels/${string}/threads/archived/public`;
|
|
62
|
+
export declare const channelTyping: (channelId: snowflake) => `channels/${string}/typing`;
|
|
63
|
+
export declare const channelWebhooks: (channelId: snowflake) => `channels/${string}/webhooks`;
|
|
64
|
+
export declare const threads: (channelId: snowflake, messageId?: snowflake) => `channels/${string}/threads`;
|
|
65
|
+
export declare const threadMembers: (threadId: snowflake, userId?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
|
66
|
+
export declare const pollAnswerVoters: (channelId: snowflake, messageId: snowflake, answerId: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
|
67
|
+
export declare const pollExpire: (channelId: snowflake, messageId: snowflake) => `channels/${string}/polls/${string}/expire`;
|
|
68
|
+
export declare const user: (userId?: snowflake | "@me") => `users/${string}`;
|
|
69
|
+
export declare const userApplicationRoleConnection: (applicationId: snowflake) => `users/@me/applications/${string}/role-connection`;
|
|
70
70
|
export declare const userChannels: () => "users/@me/channels";
|
|
71
71
|
export declare const userConnections: () => "users/@me/connections";
|
|
72
|
-
export declare const userGuild: (
|
|
72
|
+
export declare const userGuild: (guildId: snowflake) => `users/@me/guilds/${string}`;
|
|
73
73
|
export declare const userGuilds: () => "users/@me/guilds";
|
|
74
|
-
export declare const applicationActivityInstance: (
|
|
75
|
-
export declare const applicationCommand: (
|
|
76
|
-
export declare const applicationCommands: (
|
|
77
|
-
export declare const applicationCommandPermissions: (
|
|
74
|
+
export declare const applicationActivityInstance: (applicationId: snowflake, instanceId: string) => string;
|
|
75
|
+
export declare const applicationCommand: (applicationId: snowflake, commandId: snowflake) => `applications/${string}/commands/${string}`;
|
|
76
|
+
export declare const applicationCommands: (applicationId: snowflake) => `applications/${string}/commands`;
|
|
77
|
+
export declare const applicationCommandPermissions: (applicationId: snowflake, guildId: snowflake, commandId: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
|
|
78
78
|
export declare const applicationUser: () => "applications/@me";
|
|
79
|
-
export declare const applicationEmoji: (
|
|
80
|
-
export declare const applicationEmojis: (
|
|
81
|
-
export declare const applicationEntitlement: (
|
|
82
|
-
export declare const applicationEntitlementConsume: (
|
|
83
|
-
export declare const applicationEntitlements: (
|
|
84
|
-
export declare const applicationGuildCommand: (
|
|
85
|
-
export declare const applicationGuildCommands: (
|
|
86
|
-
export declare const applicationRoleConnectionMetadata: (
|
|
87
|
-
export declare const applicationSKUs: (
|
|
88
|
-
export declare const guildApplicationCommandsPermissions: (
|
|
89
|
-
export declare const webhook: (
|
|
90
|
-
export declare const webhookMessage: (
|
|
91
|
-
export declare const webhookPlatform: (
|
|
92
|
-
export declare const stickerPack: (
|
|
79
|
+
export declare const applicationEmoji: (applicationId: snowflake, emojiId: snowflake) => `applications/${string}/emojis/${string}`;
|
|
80
|
+
export declare const applicationEmojis: (applicationId: snowflake) => `applications/${string}/emojis`;
|
|
81
|
+
export declare const applicationEntitlement: (applicationId: snowflake, entitlementId: snowflake) => `applications/${string}/entitlements/${string}`;
|
|
82
|
+
export declare const applicationEntitlementConsume: (applicationId: snowflake, entitlementId: snowflake) => `applications/${string}/entitlements/${string}/consume`;
|
|
83
|
+
export declare const applicationEntitlements: (applicationId: snowflake) => `applications/${string}/entitlements`;
|
|
84
|
+
export declare const applicationGuildCommand: (applicationId: snowflake, guildId: snowflake, commandId: snowflake) => `applications/${string}/guilds/${string}/commands/${string}`;
|
|
85
|
+
export declare const applicationGuildCommands: (applicationId: snowflake, guildId: snowflake) => `applications/${string}/guilds/${string}/commands`;
|
|
86
|
+
export declare const applicationRoleConnectionMetadata: (applicationId: snowflake) => `applications/${string}/role-connections/metadata`;
|
|
87
|
+
export declare const applicationSKUs: (applicationId: snowflake) => `applications/${string}/skus`;
|
|
88
|
+
export declare const guildApplicationCommandsPermissions: (applicationId: snowflake, guildId: snowflake) => `applications/${string}/guilds/${string}/commands/permissions`;
|
|
89
|
+
export declare const webhook: (webhookId: snowflake, webhookToken?: string) => `webhooks/${string}`;
|
|
90
|
+
export declare const webhookMessage: (webhookId: snowflake, webhookToken: string, messageId?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
|
|
91
|
+
export declare const webhookPlatform: (webhookId: snowflake, webhookToken: string, platform: "github" | "slack") => `webhooks/${string}/${string}/github` | `webhooks/${string}/${string}/slack`;
|
|
92
|
+
export declare const stickerPack: (packId: snowflake) => `sticker-packs/${string}`;
|
|
93
93
|
export declare const stickerPacks: () => "sticker-packs";
|
|
94
|
-
export declare const skuSubscription: (
|
|
95
|
-
export declare const skuSubscriptions: (
|
|
96
|
-
export declare const sendSoundboardSound: (
|
|
94
|
+
export declare const skuSubscription: (skuId: snowflake, subscriptionId: snowflake) => `skus/${string}/subscriptions/${string}`;
|
|
95
|
+
export declare const skuSubscriptions: (skuId: snowflake) => `skus/${string}/subscriptions`;
|
|
96
|
+
export declare const sendSoundboardSound: (channelId: snowflake) => `channels/${string}/send-soundboard-sound`;
|
|
97
97
|
export declare const soundboardDefaultSounds: () => "soundboard-default-sounds";
|
|
98
98
|
export declare const gateway: () => "gateway";
|
|
99
99
|
export declare const gatewayBot: () => "gateway/bot";
|
|
@@ -102,9 +102,13 @@ export declare const oauth2Application: () => "oauth2/applications/@me";
|
|
|
102
102
|
export declare const oauth2Authorization: () => "oauth2/@me";
|
|
103
103
|
export declare const oauth2TokenExchange: () => "oauth2/token";
|
|
104
104
|
export declare const oauth2TokenRevocation: () => "oauth2/token/revoke";
|
|
105
|
-
export declare const interactionCallback: (
|
|
105
|
+
export declare const interactionCallback: (interactionId: snowflake, interactionToken: string) => `interactions/${string}/${string}/callback`;
|
|
106
106
|
export declare const invite: (code: string) => `invites/${string}`;
|
|
107
|
-
export declare const stageInstance: (
|
|
107
|
+
export declare const stageInstance: (channelId: snowflake) => `stage-instances/${string}`;
|
|
108
108
|
export declare const stageInstances: () => "stage-instances";
|
|
109
|
-
export declare const sticker: (
|
|
109
|
+
export declare const sticker: (stickerId: snowflake) => `stickers/${string}`;
|
|
110
110
|
export declare const voiceRegions: () => "voice/regions";
|
|
111
|
+
export declare const lobbies: () => "lobbies";
|
|
112
|
+
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
113
|
+
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
114
|
+
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|
|
@@ -2,214 +2,214 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
|
4
4
|
exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = void 0;
|
|
5
|
-
exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = void 0;
|
|
5
|
+
exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = void 0;
|
|
6
6
|
// Guilds
|
|
7
|
-
const guild = (
|
|
7
|
+
const guild = (guildId) => `guilds/${guildId}`;
|
|
8
8
|
exports.guild = guild;
|
|
9
9
|
const guilds = () => "guilds";
|
|
10
10
|
exports.guilds = guilds;
|
|
11
|
-
const guildActiveThreads = (
|
|
11
|
+
const guildActiveThreads = (guildId) => `guilds/${guildId}/threads/active`;
|
|
12
12
|
exports.guildActiveThreads = guildActiveThreads;
|
|
13
|
-
const guildAuditLog = (
|
|
13
|
+
const guildAuditLog = (guildId) => `guilds/${guildId}/audit-logs`;
|
|
14
14
|
exports.guildAuditLog = guildAuditLog;
|
|
15
|
-
const guildAutoModerationRule = (
|
|
15
|
+
const guildAutoModerationRule = (guildId, ruleId) => `guilds/${guildId}/auto-moderation/rules/${ruleId}`;
|
|
16
16
|
exports.guildAutoModerationRule = guildAutoModerationRule;
|
|
17
|
-
const guildAutoModerationRules = (
|
|
17
|
+
const guildAutoModerationRules = (guildId) => `guilds/${guildId}/auto-moderation/rules`;
|
|
18
18
|
exports.guildAutoModerationRules = guildAutoModerationRules;
|
|
19
|
-
const guildBan = (
|
|
19
|
+
const guildBan = (guildId, userId) => `guilds/${guildId}/bans/${userId}`;
|
|
20
20
|
exports.guildBan = guildBan;
|
|
21
|
-
const guildBans = (
|
|
21
|
+
const guildBans = (guildId) => `guilds/${guildId}/bans`;
|
|
22
22
|
exports.guildBans = guildBans;
|
|
23
|
-
const guildBulkBan = (
|
|
23
|
+
const guildBulkBan = (guildId) => `guilds/${guildId}/bulk-ban`;
|
|
24
24
|
exports.guildBulkBan = guildBulkBan;
|
|
25
|
-
const guildChannels = (
|
|
25
|
+
const guildChannels = (guildId) => `guilds/${guildId}/channels`;
|
|
26
26
|
exports.guildChannels = guildChannels;
|
|
27
|
-
const guildMemberNickname = (
|
|
27
|
+
const guildMemberNickname = (guildId) => `guilds/${guildId}/members/@me/nick`;
|
|
28
28
|
exports.guildMemberNickname = guildMemberNickname;
|
|
29
|
-
const guildEmoji = (
|
|
29
|
+
const guildEmoji = (guildId, emojiId) => `guilds/${guildId}/emojis/${emojiId}`;
|
|
30
30
|
exports.guildEmoji = guildEmoji;
|
|
31
|
-
const guildEmojis = (
|
|
31
|
+
const guildEmojis = (guildId) => `guilds/${guildId}/emojis`;
|
|
32
32
|
exports.guildEmojis = guildEmojis;
|
|
33
|
-
const guildIncidentsActions = (
|
|
33
|
+
const guildIncidentsActions = (guildId) => `guilds/${guildId}/incidents-actions`;
|
|
34
34
|
exports.guildIncidentsActions = guildIncidentsActions;
|
|
35
|
-
const guildIntegration = (
|
|
35
|
+
const guildIntegration = (guildId, integrationId) => `guilds/${guildId}/integrations/${integrationId}`;
|
|
36
36
|
exports.guildIntegration = guildIntegration;
|
|
37
|
-
const guildIntegrations = (
|
|
37
|
+
const guildIntegrations = (guildId) => `guilds/${guildId}/integrations`;
|
|
38
38
|
exports.guildIntegrations = guildIntegrations;
|
|
39
|
-
const guildInvites = (
|
|
39
|
+
const guildInvites = (guildId) => `guilds/${guildId}/invites`;
|
|
40
40
|
exports.guildInvites = guildInvites;
|
|
41
|
-
const guildMFA = (
|
|
41
|
+
const guildMFA = (guildId) => `guilds/${guildId}/mfa`;
|
|
42
42
|
exports.guildMFA = guildMFA;
|
|
43
|
-
const guildMember = (
|
|
43
|
+
const guildMember = (guildId, userId = "@me") => `guilds/${guildId}/members/${userId}`;
|
|
44
44
|
exports.guildMember = guildMember;
|
|
45
|
-
const guildMemberRole = (
|
|
45
|
+
const guildMemberRole = (guildId, memberId, roleId) => `guilds/${guildId}/members/${memberId}/roles/${roleId}`;
|
|
46
46
|
exports.guildMemberRole = guildMemberRole;
|
|
47
|
-
const guildMembers = (
|
|
47
|
+
const guildMembers = (guildId) => `guilds/${guildId}/members`;
|
|
48
48
|
exports.guildMembers = guildMembers;
|
|
49
|
-
const guildMembersSearch = (
|
|
49
|
+
const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
|
|
50
50
|
exports.guildMembersSearch = guildMembersSearch;
|
|
51
|
-
const guildMemberVerification = (
|
|
51
|
+
const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
|
|
52
52
|
exports.guildMemberVerification = guildMemberVerification;
|
|
53
|
-
const guildOnboarding = (
|
|
53
|
+
const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
|
|
54
54
|
exports.guildOnboarding = guildOnboarding;
|
|
55
|
-
const guildPreview = (
|
|
55
|
+
const guildPreview = (guildId) => `guilds/${guildId}/preview`;
|
|
56
56
|
exports.guildPreview = guildPreview;
|
|
57
|
-
const guildPrune = (
|
|
57
|
+
const guildPrune = (guildId) => `guilds/${guildId}/prune`;
|
|
58
58
|
exports.guildPrune = guildPrune;
|
|
59
|
-
const guildRole = (
|
|
59
|
+
const guildRole = (guildId, roleId) => `guilds/${guildId}/roles/${roleId}`;
|
|
60
60
|
exports.guildRole = guildRole;
|
|
61
|
-
const guildRoles = (
|
|
61
|
+
const guildRoles = (guildId) => `guilds/${guildId}/roles`;
|
|
62
62
|
exports.guildRoles = guildRoles;
|
|
63
|
-
const guildScheduledEvent = (
|
|
63
|
+
const guildScheduledEvent = (guildId, guildScheduledEventId) => `guilds/${guildId}/scheduled-events/${guildScheduledEventId}`;
|
|
64
64
|
exports.guildScheduledEvent = guildScheduledEvent;
|
|
65
|
-
const guildScheduledEvents = (
|
|
65
|
+
const guildScheduledEvents = (guildId) => `guilds/${guildId}/scheduled-events`;
|
|
66
66
|
exports.guildScheduledEvents = guildScheduledEvents;
|
|
67
|
-
const guildScheduledEventUsers = (
|
|
67
|
+
const guildScheduledEventUsers = (guildId, guildScheduledEventId) => `guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`;
|
|
68
68
|
exports.guildScheduledEventUsers = guildScheduledEventUsers;
|
|
69
|
-
const guildSoundboardSound = (
|
|
69
|
+
const guildSoundboardSound = (guildId, soundId) => `guilds/${guildId}/soundboard-sounds/${soundId}`;
|
|
70
70
|
exports.guildSoundboardSound = guildSoundboardSound;
|
|
71
|
-
const guildSoundboardSounds = (
|
|
71
|
+
const guildSoundboardSounds = (guildId) => `guilds/${guildId}/soundboard-sounds`;
|
|
72
72
|
exports.guildSoundboardSounds = guildSoundboardSounds;
|
|
73
|
-
const guildSticker = (
|
|
73
|
+
const guildSticker = (guildId, stickerId) => `guilds/${guildId}/stickers/${stickerId}`;
|
|
74
74
|
exports.guildSticker = guildSticker;
|
|
75
|
-
const guildStickers = (
|
|
75
|
+
const guildStickers = (guildId) => `guilds/${guildId}/stickers`;
|
|
76
76
|
exports.guildStickers = guildStickers;
|
|
77
|
-
const guildTemplate = (
|
|
77
|
+
const guildTemplate = (guildId, code) => `guilds/${guildId}/templates/${code}`;
|
|
78
78
|
exports.guildTemplate = guildTemplate;
|
|
79
|
-
const guildTemplates = (
|
|
79
|
+
const guildTemplates = (guildId) => `guilds/${guildId}/templates`;
|
|
80
80
|
exports.guildTemplates = guildTemplates;
|
|
81
|
-
const guildVanityURL = (
|
|
81
|
+
const guildVanityURL = (guildId) => `guilds/${guildId}/vanity-url`;
|
|
82
82
|
exports.guildVanityURL = guildVanityURL;
|
|
83
|
-
const guildVoiceRegions = (
|
|
83
|
+
const guildVoiceRegions = (guildId) => `guilds/${guildId}/regions`;
|
|
84
84
|
exports.guildVoiceRegions = guildVoiceRegions;
|
|
85
|
-
const guildVoiceState = (
|
|
85
|
+
const guildVoiceState = (guildId, userId = "@me") => `guilds/${guildId}/voice-states/${userId}`;
|
|
86
86
|
exports.guildVoiceState = guildVoiceState;
|
|
87
|
-
const guildWebhooks = (
|
|
87
|
+
const guildWebhooks = (guildId) => `guilds/${guildId}/webhooks`;
|
|
88
88
|
exports.guildWebhooks = guildWebhooks;
|
|
89
|
-
const guildWelcomeScreen = (
|
|
89
|
+
const guildWelcomeScreen = (guildId) => `guilds/${guildId}/welcome-screen`;
|
|
90
90
|
exports.guildWelcomeScreen = guildWelcomeScreen;
|
|
91
|
-
const guildWidgetImage = (
|
|
91
|
+
const guildWidgetImage = (guildId) => `guilds/${guildId}/widget.png`;
|
|
92
92
|
exports.guildWidgetImage = guildWidgetImage;
|
|
93
|
-
const guildWidgetJSON = (
|
|
93
|
+
const guildWidgetJSON = (guildId) => `guilds/${guildId}/widget.json`;
|
|
94
94
|
exports.guildWidgetJSON = guildWidgetJSON;
|
|
95
|
-
const guildWidgetSettings = (
|
|
95
|
+
const guildWidgetSettings = (guildId) => `guilds/${guildId}/widget`;
|
|
96
96
|
exports.guildWidgetSettings = guildWidgetSettings;
|
|
97
97
|
const template = (code) => `guilds/templates/${code}`;
|
|
98
98
|
exports.template = template;
|
|
99
99
|
// Channels
|
|
100
|
-
const channel = (
|
|
100
|
+
const channel = (channelId) => `channels/${channelId}`;
|
|
101
101
|
exports.channel = channel;
|
|
102
|
-
const channelBulkDelete = (
|
|
102
|
+
const channelBulkDelete = (channelId) => `channels/${channelId}/messages/bulk-delete`;
|
|
103
103
|
exports.channelBulkDelete = channelBulkDelete;
|
|
104
|
-
const channelFollowers = (
|
|
104
|
+
const channelFollowers = (channelId) => `channels/${channelId}/followers`;
|
|
105
105
|
exports.channelFollowers = channelFollowers;
|
|
106
|
-
const channelInvites = (
|
|
106
|
+
const channelInvites = (channelId) => `channels/${channelId}/invites`;
|
|
107
107
|
exports.channelInvites = channelInvites;
|
|
108
|
-
const channelMessage = (
|
|
108
|
+
const channelMessage = (channelId, messageId) => `channels/${channelId}/messages/${messageId}`;
|
|
109
109
|
exports.channelMessage = channelMessage;
|
|
110
|
-
const channelMessageAllReactions = (
|
|
111
|
-
? `channels/${
|
|
112
|
-
: `channels/${
|
|
110
|
+
const channelMessageAllReactions = (channelId, messageId, emoji) => emoji
|
|
111
|
+
? `channels/${channelId}/messages/${messageId}/reactions/${emoji}`
|
|
112
|
+
: `channels/${channelId}/messages/${messageId}/reactions`;
|
|
113
113
|
exports.channelMessageAllReactions = channelMessageAllReactions;
|
|
114
|
-
const channelMessageCrosspost = (
|
|
114
|
+
const channelMessageCrosspost = (channelId, messageId) => `channels/${channelId}/messages/${messageId}/crosspost`;
|
|
115
115
|
exports.channelMessageCrosspost = channelMessageCrosspost;
|
|
116
|
-
const channelMessageReaction = (
|
|
116
|
+
const channelMessageReaction = (channelId, messageId, emoji, userId = "@me") => `channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`;
|
|
117
117
|
exports.channelMessageReaction = channelMessageReaction;
|
|
118
|
-
const channelMessages = (
|
|
118
|
+
const channelMessages = (channelId) => `channels/${channelId}/messages`;
|
|
119
119
|
exports.channelMessages = channelMessages;
|
|
120
|
-
const channelPermission = (
|
|
120
|
+
const channelPermission = (channelId, overwriteId) => `channels/${channelId}/permissions/${overwriteId}`;
|
|
121
121
|
exports.channelPermission = channelPermission;
|
|
122
|
-
const channelPin = (
|
|
122
|
+
const channelPin = (channelId, messageId) => `channels/${channelId}/messages/pins/${messageId}`;
|
|
123
123
|
exports.channelPin = channelPin;
|
|
124
|
-
const channelPins = (
|
|
124
|
+
const channelPins = (channelId) => `channels/${channelId}/messages/pins`;
|
|
125
125
|
exports.channelPins = channelPins;
|
|
126
|
-
const channelRecipient = (
|
|
126
|
+
const channelRecipient = (channelId, userId) => `channels/${channelId}/recipients/${userId}`;
|
|
127
127
|
exports.channelRecipient = channelRecipient;
|
|
128
|
-
const channelThreads = (
|
|
129
|
-
? `channels/${
|
|
130
|
-
: `channels/${
|
|
128
|
+
const channelThreads = (channelId, archivedStatus, joined) => joined
|
|
129
|
+
? `channels/${channelId}/users/@me/threads/archived/${archivedStatus}`
|
|
130
|
+
: `channels/${channelId}/threads/archived/${archivedStatus}`;
|
|
131
131
|
exports.channelThreads = channelThreads;
|
|
132
|
-
const channelTyping = (
|
|
132
|
+
const channelTyping = (channelId) => `channels/${channelId}/typing`;
|
|
133
133
|
exports.channelTyping = channelTyping;
|
|
134
|
-
const channelWebhooks = (
|
|
134
|
+
const channelWebhooks = (channelId) => `channels/${channelId}/webhooks`;
|
|
135
135
|
exports.channelWebhooks = channelWebhooks;
|
|
136
|
-
const threads = (
|
|
137
|
-
? `channels/${
|
|
138
|
-
: `channels/${
|
|
136
|
+
const threads = (channelId, messageId) => messageId
|
|
137
|
+
? `channels/${channelId}/messages/${messageId}/threads`
|
|
138
|
+
: `channels/${channelId}/threads`;
|
|
139
139
|
exports.threads = threads;
|
|
140
|
-
const threadMembers = (
|
|
141
|
-
? `channels/${
|
|
142
|
-
: `channels/${
|
|
140
|
+
const threadMembers = (threadId, userId) => userId
|
|
141
|
+
? `channels/${threadId}/thread-members`
|
|
142
|
+
: `channels/${threadId}/thread-members/${userId}`;
|
|
143
143
|
exports.threadMembers = threadMembers;
|
|
144
|
-
const pollAnswerVoters = (
|
|
144
|
+
const pollAnswerVoters = (channelId, messageId, answerId) => `channels/${channelId}/polls/${messageId}/answers/${answerId}`;
|
|
145
145
|
exports.pollAnswerVoters = pollAnswerVoters;
|
|
146
|
-
const pollExpire = (
|
|
146
|
+
const pollExpire = (channelId, messageId) => `channels/${channelId}/polls/${messageId}/expire`;
|
|
147
147
|
exports.pollExpire = pollExpire;
|
|
148
148
|
// Users
|
|
149
|
-
const user = (
|
|
149
|
+
const user = (userId = "@me") => `users/${userId}`;
|
|
150
150
|
exports.user = user;
|
|
151
|
-
const userApplicationRoleConnection = (
|
|
151
|
+
const userApplicationRoleConnection = (applicationId) => `users/@me/applications/${applicationId}/role-connection`;
|
|
152
152
|
exports.userApplicationRoleConnection = userApplicationRoleConnection;
|
|
153
153
|
const userChannels = () => "users/@me/channels";
|
|
154
154
|
exports.userChannels = userChannels;
|
|
155
155
|
const userConnections = () => "users/@me/connections";
|
|
156
156
|
exports.userConnections = userConnections;
|
|
157
|
-
const userGuild = (
|
|
157
|
+
const userGuild = (guildId) => `users/@me/guilds/${guildId}`;
|
|
158
158
|
exports.userGuild = userGuild;
|
|
159
159
|
const userGuilds = () => "users/@me/guilds";
|
|
160
160
|
exports.userGuilds = userGuilds;
|
|
161
161
|
// Applications
|
|
162
|
-
const applicationActivityInstance = (
|
|
162
|
+
const applicationActivityInstance = (applicationId, instanceId) => `applications/${applicationId}/activity-instances/${instanceId}`;
|
|
163
163
|
exports.applicationActivityInstance = applicationActivityInstance;
|
|
164
|
-
const applicationCommand = (
|
|
164
|
+
const applicationCommand = (applicationId, commandId) => `applications/${applicationId}/commands/${commandId}`;
|
|
165
165
|
exports.applicationCommand = applicationCommand;
|
|
166
|
-
const applicationCommands = (
|
|
166
|
+
const applicationCommands = (applicationId) => `applications/${applicationId}/commands`;
|
|
167
167
|
exports.applicationCommands = applicationCommands;
|
|
168
|
-
const applicationCommandPermissions = (
|
|
168
|
+
const applicationCommandPermissions = (applicationId, guildId, commandId) => `applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`;
|
|
169
169
|
exports.applicationCommandPermissions = applicationCommandPermissions;
|
|
170
170
|
const applicationUser = () => "applications/@me";
|
|
171
171
|
exports.applicationUser = applicationUser;
|
|
172
|
-
const applicationEmoji = (
|
|
172
|
+
const applicationEmoji = (applicationId, emojiId) => `applications/${applicationId}/emojis/${emojiId}`;
|
|
173
173
|
exports.applicationEmoji = applicationEmoji;
|
|
174
|
-
const applicationEmojis = (
|
|
174
|
+
const applicationEmojis = (applicationId) => `applications/${applicationId}/emojis`;
|
|
175
175
|
exports.applicationEmojis = applicationEmojis;
|
|
176
|
-
const applicationEntitlement = (
|
|
176
|
+
const applicationEntitlement = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}`;
|
|
177
177
|
exports.applicationEntitlement = applicationEntitlement;
|
|
178
|
-
const applicationEntitlementConsume = (
|
|
178
|
+
const applicationEntitlementConsume = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}/consume`;
|
|
179
179
|
exports.applicationEntitlementConsume = applicationEntitlementConsume;
|
|
180
|
-
const applicationEntitlements = (
|
|
180
|
+
const applicationEntitlements = (applicationId) => `applications/${applicationId}/entitlements`;
|
|
181
181
|
exports.applicationEntitlements = applicationEntitlements;
|
|
182
|
-
const applicationGuildCommand = (
|
|
182
|
+
const applicationGuildCommand = (applicationId, guildId, commandId) => `applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
|
|
183
183
|
exports.applicationGuildCommand = applicationGuildCommand;
|
|
184
|
-
const applicationGuildCommands = (
|
|
184
|
+
const applicationGuildCommands = (applicationId, guildId) => `applications/${applicationId}/guilds/${guildId}/commands`;
|
|
185
185
|
exports.applicationGuildCommands = applicationGuildCommands;
|
|
186
|
-
const applicationRoleConnectionMetadata = (
|
|
186
|
+
const applicationRoleConnectionMetadata = (applicationId) => `applications/${applicationId}/role-connections/metadata`;
|
|
187
187
|
exports.applicationRoleConnectionMetadata = applicationRoleConnectionMetadata;
|
|
188
|
-
const applicationSKUs = (
|
|
188
|
+
const applicationSKUs = (applicationId) => `applications/${applicationId}/skus`;
|
|
189
189
|
exports.applicationSKUs = applicationSKUs;
|
|
190
|
-
const guildApplicationCommandsPermissions = (
|
|
190
|
+
const guildApplicationCommandsPermissions = (applicationId, guildId) => `applications/${applicationId}/guilds/${guildId}/commands/permissions`;
|
|
191
191
|
exports.guildApplicationCommandsPermissions = guildApplicationCommandsPermissions;
|
|
192
192
|
// Webhooks
|
|
193
|
-
const webhook = (
|
|
194
|
-
? `webhooks/${
|
|
195
|
-
: `webhooks/${
|
|
193
|
+
const webhook = (webhookId, webhookToken) => webhookToken
|
|
194
|
+
? `webhooks/${webhookId}/${webhookToken}`
|
|
195
|
+
: `webhooks/${webhookId}`;
|
|
196
196
|
exports.webhook = webhook;
|
|
197
|
-
const webhookMessage = (
|
|
197
|
+
const webhookMessage = (webhookId, webhookToken, messageId = "@original") => `webhooks/${webhookId}/${webhookToken}/messages/${messageId}`;
|
|
198
198
|
exports.webhookMessage = webhookMessage;
|
|
199
|
-
const webhookPlatform = (
|
|
199
|
+
const webhookPlatform = (webhookId, webhookToken, platform) => `webhooks/${webhookId}/${webhookToken}/${platform}`;
|
|
200
200
|
exports.webhookPlatform = webhookPlatform;
|
|
201
201
|
// Sticker packs
|
|
202
|
-
const stickerPack = (
|
|
202
|
+
const stickerPack = (packId) => `sticker-packs/${packId}`;
|
|
203
203
|
exports.stickerPack = stickerPack;
|
|
204
204
|
const stickerPacks = () => "sticker-packs";
|
|
205
205
|
exports.stickerPacks = stickerPacks;
|
|
206
206
|
// Subscriptions
|
|
207
|
-
const skuSubscription = (
|
|
207
|
+
const skuSubscription = (skuId, subscriptionId) => `skus/${skuId}/subscriptions/${subscriptionId}`;
|
|
208
208
|
exports.skuSubscription = skuSubscription;
|
|
209
|
-
const skuSubscriptions = (
|
|
209
|
+
const skuSubscriptions = (skuId) => `skus/${skuId}/subscriptions`;
|
|
210
210
|
exports.skuSubscriptions = skuSubscriptions;
|
|
211
211
|
// Soundboards
|
|
212
|
-
const sendSoundboardSound = (
|
|
212
|
+
const sendSoundboardSound = (channelId) => `channels/${channelId}/send-soundboard-sound`;
|
|
213
213
|
exports.sendSoundboardSound = sendSoundboardSound;
|
|
214
214
|
const soundboardDefaultSounds = () => `soundboard-default-sounds`;
|
|
215
215
|
exports.soundboardDefaultSounds = soundboardDefaultSounds;
|
|
@@ -230,15 +230,24 @@ exports.oauth2TokenExchange = oauth2TokenExchange;
|
|
|
230
230
|
const oauth2TokenRevocation = () => "oauth2/token/revoke";
|
|
231
231
|
exports.oauth2TokenRevocation = oauth2TokenRevocation;
|
|
232
232
|
// Misc
|
|
233
|
-
const interactionCallback = (
|
|
233
|
+
const interactionCallback = (interactionId, interactionToken) => `interactions/${interactionId}/${interactionToken}/callback`;
|
|
234
234
|
exports.interactionCallback = interactionCallback;
|
|
235
235
|
const invite = (code) => `invites/${code}`;
|
|
236
236
|
exports.invite = invite;
|
|
237
|
-
const stageInstance = (
|
|
237
|
+
const stageInstance = (channelId) => `stage-instances/${channelId}`;
|
|
238
238
|
exports.stageInstance = stageInstance;
|
|
239
239
|
const stageInstances = () => "stage-instances";
|
|
240
240
|
exports.stageInstances = stageInstances;
|
|
241
|
-
const sticker = (
|
|
241
|
+
const sticker = (stickerId) => `stickers/${stickerId}`;
|
|
242
242
|
exports.sticker = sticker;
|
|
243
243
|
const voiceRegions = () => "voice/regions";
|
|
244
244
|
exports.voiceRegions = voiceRegions;
|
|
245
|
+
// Lobbies
|
|
246
|
+
const lobbies = () => "lobbies";
|
|
247
|
+
exports.lobbies = lobbies;
|
|
248
|
+
const lobby = (lobbyId) => `lobbies/${lobbyId}`;
|
|
249
|
+
exports.lobby = lobby;
|
|
250
|
+
const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}`;
|
|
251
|
+
exports.lobbyMember = lobbyMember;
|
|
252
|
+
const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
|
|
253
|
+
exports.lobbyChannelLinking = lobbyChannelLinking;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { type JSONErrorCodes } from "../constants";
|
|
4
2
|
export declare enum RESTMethods {
|
|
5
3
|
Get = "GET",
|
|
@@ -23,7 +21,7 @@ export interface ErrorResponse {
|
|
|
23
21
|
errors: Record<string, unknown>;
|
|
24
22
|
}
|
|
25
23
|
export interface FileData {
|
|
26
|
-
contents:
|
|
24
|
+
contents: BlobPart;
|
|
27
25
|
name: string;
|
|
28
26
|
}
|
|
29
27
|
export declare class RequestManager {
|