disgroove 2.2.1-dev.d0eed5e → 2.2.1-dev.efad41d
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 +220 -220
- package/dist/lib/Client.js +400 -400
- package/dist/lib/constants.d.ts +4 -4
- package/dist/lib/constants.js +4 -4
- package/dist/lib/gateway/Shard.d.ts +1 -1
- package/dist/lib/gateway/Shard.js +70 -70
- package/dist/lib/rest/CDN.d.ts +20 -20
- package/dist/lib/rest/CDN.js +20 -20
- package/dist/lib/rest/Endpoints.d.ts +81 -81
- package/dist/lib/rest/Endpoints.js +91 -91
- package/dist/lib/types/application-command.d.ts +4 -4
- package/dist/lib/types/application.d.ts +2 -2
- package/dist/lib/types/audit-log.d.ts +5 -5
- package/dist/lib/types/auto-moderation.d.ts +3 -3
- package/dist/lib/types/channel.d.ts +23 -21
- package/dist/lib/types/entitlements.d.ts +6 -6
- package/dist/lib/types/gateway-events.d.ts +69 -69
- package/dist/lib/types/guild-scheduled-event.d.ts +5 -5
- package/dist/lib/types/guild-template.d.ts +2 -2
- package/dist/lib/types/guild.d.ts +17 -17
- package/dist/lib/types/interaction.d.ts +8 -8
- package/dist/lib/types/message-components.d.ts +4 -4
- package/dist/lib/types/poll.d.ts +1 -1
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +2 -2
- package/dist/lib/types/stage-instance.d.ts +3 -3
- package/dist/lib/types/sticker.d.ts +5 -5
- package/dist/lib/types/team.d.ts +2 -2
- package/dist/lib/types/user.d.ts +1 -1
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +3 -3
- package/dist/lib/utils/Util.d.ts +2 -2
- package/dist/lib/utils/Util.js +195 -193
- package/dist/package.json +1 -1
- package/package.json +1 -1
@@ -1,88 +1,88 @@
|
|
1
1
|
import type { snowflake } from "../types/common";
|
2
|
-
export declare const bulkGuildBan: (
|
3
|
-
export declare const guild: (
|
2
|
+
export declare const bulkGuildBan: (guildID: snowflake) => `guilds/${string}/bulk-ban`;
|
3
|
+
export declare const guild: (guildID: snowflake) => `guilds/${string}`;
|
4
4
|
export declare const guilds: () => "guilds";
|
5
|
-
export declare const guildActiveThreads: (
|
6
|
-
export declare const guildAuditLog: (
|
7
|
-
export declare const guildAutoModerationRule: (
|
8
|
-
export declare const guildAutoModerationRules: (
|
9
|
-
export declare const guildBan: (
|
10
|
-
export declare const guildBans: (
|
11
|
-
export declare const guildChannels: (
|
12
|
-
export declare const guildCurrentMemberNickname: (
|
13
|
-
export declare const guildEmoji: (
|
14
|
-
export declare const guildEmojis: (
|
15
|
-
export declare const guildIntegration: (
|
16
|
-
export declare const guildIntegrations: (
|
17
|
-
export declare const guildInvites: (
|
18
|
-
export declare const guildMFA: (
|
19
|
-
export declare const guildMember: (
|
20
|
-
export declare const guildMemberRole: (
|
21
|
-
export declare const guildMembers: (
|
22
|
-
export declare const guildMembersSearch: (
|
23
|
-
export declare const guildMemberVerification: (
|
24
|
-
export declare const guildOnboarding: (
|
25
|
-
export declare const guildPreview: (
|
26
|
-
export declare const guildPrune: (
|
27
|
-
export declare const guildRole: (
|
28
|
-
export declare const guildRoles: (
|
29
|
-
export declare const guildScheduledEvent: (
|
30
|
-
export declare const guildScheduledEvents: (
|
31
|
-
export declare const guildScheduledEventUsers: (
|
32
|
-
export declare const guildSticker: (
|
33
|
-
export declare const guildStickers: (
|
34
|
-
export declare const guildTemplate: (
|
35
|
-
export declare const guildTemplates: (
|
36
|
-
export declare const guildVanityURL: (
|
37
|
-
export declare const guildVoiceRegions: (
|
38
|
-
export declare const guildVoiceState: (
|
39
|
-
export declare const guildWebhooks: (
|
40
|
-
export declare const guildWelcomeScreen: (
|
41
|
-
export declare const guildWidgetImage: (
|
42
|
-
export declare const guildWidgetJSON: (
|
43
|
-
export declare const guildWidgetSettings: (
|
5
|
+
export declare const guildActiveThreads: (guildID: snowflake) => `guilds/${string}/threads/active`;
|
6
|
+
export declare const guildAuditLog: (guildID: snowflake) => `guilds/${string}/audit-logs`;
|
7
|
+
export declare const guildAutoModerationRule: (guildID: snowflake, ruleID: snowflake) => `guilds/${string}/auto-moderation/rules/${string}`;
|
8
|
+
export declare const guildAutoModerationRules: (guildID: snowflake) => `guilds/${string}/auto-moderation/rules`;
|
9
|
+
export declare const guildBan: (guildID: snowflake, userID: snowflake) => `guilds/${string}/bans/${string}`;
|
10
|
+
export declare const guildBans: (guildID: snowflake) => `guilds/${string}/bans`;
|
11
|
+
export declare const guildChannels: (guildID: snowflake) => `guilds/${string}/channels`;
|
12
|
+
export declare const guildCurrentMemberNickname: (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 guildIntegration: (guildID: snowflake, integrationID: snowflake) => `guilds/${string}/integrations/${string}`;
|
16
|
+
export declare const guildIntegrations: (guildID: snowflake) => `guilds/${string}/integrations`;
|
17
|
+
export declare const guildInvites: (guildID: snowflake) => `guilds/${string}/invites`;
|
18
|
+
export declare const guildMFA: (guildID: snowflake) => `guilds/${string}/mfa`;
|
19
|
+
export declare const guildMember: (guildID: snowflake, userID?: snowflake | "@me") => `guilds/${string}/members/${string}`;
|
20
|
+
export declare const guildMemberRole: (guildID: snowflake, memberID: snowflake, roleID: snowflake) => `guilds/${string}/members/${string}/roles/${string}`;
|
21
|
+
export declare const guildMembers: (guildID: snowflake) => `guilds/${string}/members`;
|
22
|
+
export declare const guildMembersSearch: (guildID: snowflake) => `guilds/${string}/members/search`;
|
23
|
+
export declare const guildMemberVerification: (guildID: snowflake) => `guilds/${string}/member-verification`;
|
24
|
+
export declare const guildOnboarding: (guildID: snowflake) => `guilds/${string}/onboarding`;
|
25
|
+
export declare const guildPreview: (guildID: snowflake) => `guilds/${string}/preview`;
|
26
|
+
export declare const guildPrune: (guildID: snowflake) => `guilds/${string}/prune`;
|
27
|
+
export declare const guildRole: (guildID: snowflake, roleID: snowflake) => `guilds/${string}/roles/${string}`;
|
28
|
+
export declare const guildRoles: (guildID: snowflake) => `guilds/${string}/roles`;
|
29
|
+
export declare const guildScheduledEvent: (guildID: snowflake, guildScheduledEventID: snowflake) => `guilds/${string}/scheduled-events/${string}`;
|
30
|
+
export declare const guildScheduledEvents: (guildID: snowflake) => `guilds/${string}/scheduled-events`;
|
31
|
+
export declare const guildScheduledEventUsers: (guildID: snowflake, guildScheduledEventID: snowflake) => `guilds/${string}/scheduled-events/${string}/users`;
|
32
|
+
export declare const guildSticker: (guildID: snowflake, stickerID: snowflake) => `guilds/${string}/stickers/${string}`;
|
33
|
+
export declare const guildStickers: (guildID: snowflake) => `guilds/${string}/stickers`;
|
34
|
+
export declare const guildTemplate: (guildID: snowflake, code: string) => `guilds/${string}/templates/${string}`;
|
35
|
+
export declare const guildTemplates: (guildID: snowflake) => `guilds/${string}/templates`;
|
36
|
+
export declare const guildVanityURL: (guildID: snowflake) => `guilds/${string}/vanity-url`;
|
37
|
+
export declare const guildVoiceRegions: (guildID: snowflake) => `guilds/${string}/regions`;
|
38
|
+
export declare const guildVoiceState: (guildID: snowflake, userID?: snowflake | "@me") => `guilds/${string}/voice-states/${string}`;
|
39
|
+
export declare const guildWebhooks: (guildID: snowflake) => `guilds/${string}/webhooks`;
|
40
|
+
export declare const guildWelcomeScreen: (guildID: snowflake) => `guilds/${string}/welcome-screen`;
|
41
|
+
export declare const guildWidgetImage: (guildID: snowflake) => `guilds/${string}/widget.png`;
|
42
|
+
export declare const guildWidgetJSON: (guildID: snowflake) => `guilds/${string}/widget.json`;
|
43
|
+
export declare const guildWidgetSettings: (guildID: snowflake) => `guilds/${string}/widget`;
|
44
44
|
export declare const template: (code: string) => `guilds/templates/${string}`;
|
45
|
-
export declare const channel: (
|
46
|
-
export declare const channelBulkDelete: (
|
47
|
-
export declare const channelFollowers: (
|
48
|
-
export declare const channelInvites: (
|
49
|
-
export declare const channelMessage: (
|
50
|
-
export declare const channelMessageAllReactions: (
|
51
|
-
export declare const channelMessageCrosspost: (
|
52
|
-
export declare const channelMessageReaction: (
|
53
|
-
export declare const channelMessages: (
|
54
|
-
export declare const channelPermission: (
|
55
|
-
export declare const channelPin: (
|
56
|
-
export declare const channelPins: (
|
57
|
-
export declare const channelRecipient: (
|
58
|
-
export declare const channelThreads: (
|
59
|
-
export declare const channelTyping: (
|
60
|
-
export declare const channelWebhooks: (
|
61
|
-
export declare const threads: (
|
62
|
-
export declare const threadMembers: (
|
63
|
-
export declare const pollAnswerVoters: (
|
64
|
-
export declare const pollExpire: (
|
65
|
-
export declare const user: (
|
66
|
-
export declare const userApplicationRoleConnection: (
|
45
|
+
export declare const channel: (channelID: snowflake) => `channels/${string}`;
|
46
|
+
export declare const channelBulkDelete: (channelID: snowflake) => `channels/${string}/messages/bulk-delete`;
|
47
|
+
export declare const channelFollowers: (channelID: snowflake) => `channels/${string}/followers`;
|
48
|
+
export declare const channelInvites: (channelID: snowflake) => `channels/${string}/invites`;
|
49
|
+
export declare const channelMessage: (channelID: snowflake, messageID: snowflake) => `channels/${string}/messages/${string}`;
|
50
|
+
export declare const channelMessageAllReactions: (channelID: snowflake, messageID: snowflake, emoji?: string) => `channels/${string}/messages/${string}/reactions/${string}` | `channels/${string}/messages/${string}/reactions`;
|
51
|
+
export declare const channelMessageCrosspost: (channelID: snowflake, messageID: snowflake) => `channels/${string}/messages/${string}/crosspost`;
|
52
|
+
export declare const channelMessageReaction: (channelID: snowflake, messageID: snowflake, emoji: string, userID?: snowflake | "@me") => `channels/${string}/messages/${string}/reactions/${string}/${string}`;
|
53
|
+
export declare const channelMessages: (channelID: snowflake) => `channels/${string}/messages`;
|
54
|
+
export declare const channelPermission: (channelID: snowflake, overwriteID: snowflake) => `channels/${string}/permissions/${string}`;
|
55
|
+
export declare const channelPin: (channelID: snowflake, messageID: snowflake) => `channels/${string}/pins/${string}`;
|
56
|
+
export declare const channelPins: (channelID: snowflake) => `channels/${string}/pins`;
|
57
|
+
export declare const channelRecipient: (channelID: snowflake, userID: snowflake) => `channels/${string}/recipients/${string}`;
|
58
|
+
export declare const channelThreads: (channelID: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/private` | `channels/${string}/threads/archived/public`;
|
59
|
+
export declare const channelTyping: (channelID: snowflake) => `channels/${string}/typing`;
|
60
|
+
export declare const channelWebhooks: (channelID: snowflake) => `channels/${string}/webhooks`;
|
61
|
+
export declare const threads: (channelID: snowflake, messageID?: snowflake) => `channels/${string}/threads`;
|
62
|
+
export declare const threadMembers: (threadID: snowflake, userID?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
63
|
+
export declare const pollAnswerVoters: (channelID: snowflake, messageID: snowflake, answerID: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
64
|
+
export declare const pollExpire: (channelID: snowflake, messageID: snowflake) => `channels/${string}/polls/${string}/expire`;
|
65
|
+
export declare const user: (userID?: snowflake | "@me") => `users/${string}`;
|
66
|
+
export declare const userApplicationRoleConnection: (applicationID: snowflake) => `users/@me/applications/${string}/role-connection`;
|
67
67
|
export declare const userChannels: () => "users/@me/channels";
|
68
68
|
export declare const userConnections: () => "users/@me/connections";
|
69
|
-
export declare const userGuild: (
|
69
|
+
export declare const userGuild: (guildID: snowflake) => `users/@me/guilds/${string}`;
|
70
70
|
export declare const userGuilds: () => "users/@me/guilds";
|
71
|
-
export declare const applicationCommand: (
|
72
|
-
export declare const applicationCommands: (
|
73
|
-
export declare const applicationCommandPermissions: (
|
71
|
+
export declare const applicationCommand: (applicationID: snowflake, commandID: snowflake) => `applications/${string}/commands/${string}`;
|
72
|
+
export declare const applicationCommands: (applicationID: snowflake) => `applications/${string}/commands`;
|
73
|
+
export declare const applicationCommandPermissions: (applicationID: snowflake, guildID: snowflake, commandID: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
|
74
74
|
export declare const applicationCurrentUser: () => "applications/@me";
|
75
|
-
export declare const applicationEntitlement: (
|
76
|
-
export declare const applicationEntitlementConsume: (
|
77
|
-
export declare const applicationEntitlements: (
|
78
|
-
export declare const applicationGuildCommand: (
|
79
|
-
export declare const applicationGuildCommands: (
|
80
|
-
export declare const applicationRoleConnectionMetadata: (
|
81
|
-
export declare const applicationSKUs: (
|
82
|
-
export declare const guildApplicationCommandsPermissions: (
|
83
|
-
export declare const webhook: (
|
84
|
-
export declare const webhookMessage: (
|
85
|
-
export declare const webhookPlatform: (
|
75
|
+
export declare const applicationEntitlement: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}`;
|
76
|
+
export declare const applicationEntitlementConsume: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}/consume`;
|
77
|
+
export declare const applicationEntitlements: (applicationID: snowflake) => `applications/${string}/entitlements`;
|
78
|
+
export declare const applicationGuildCommand: (applicationID: snowflake, guildID: snowflake, commandID: snowflake) => `applications/${string}/guilds/${string}/commands/${string}`;
|
79
|
+
export declare const applicationGuildCommands: (applicationID: snowflake, guildID: snowflake) => `applications/${string}/guilds/${string}/commands`;
|
80
|
+
export declare const applicationRoleConnectionMetadata: (applicationID: snowflake) => `applications/${string}/role-connections/metadata`;
|
81
|
+
export declare const applicationSKUs: (applicationID: snowflake) => `applications/${string}/skus`;
|
82
|
+
export declare const guildApplicationCommandsPermissions: (applicationID: snowflake, guildID: snowflake) => `applications/${string}/guilds/${string}/commands/permissions`;
|
83
|
+
export declare const webhook: (webhookID: snowflake, webhookToken?: string) => `webhooks/${string}`;
|
84
|
+
export declare const webhookMessage: (webhookID: snowflake, webhookToken: string, messageID?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
|
85
|
+
export declare const webhookPlatform: (webhookID: snowflake, webhookToken: string, platform: "github" | "slack") => `webhooks/${string}/${string}/github` | `webhooks/${string}/${string}/slack`;
|
86
86
|
export declare const gateway: () => "gateway";
|
87
87
|
export declare const gatewayBot: () => "gateway/bot";
|
88
88
|
export declare const oauth2Authorization: () => "oauth2/authorize";
|
@@ -90,10 +90,10 @@ export declare const oauth2CurrentApplication: () => "oauth2/applications/@me";
|
|
90
90
|
export declare const oauth2CurrentAuthorization: () => "oauth2/@me";
|
91
91
|
export declare const oauth2TokenExchange: () => "oauth2/token";
|
92
92
|
export declare const oauth2TokenRevocation: () => "oauth2/token/revoke";
|
93
|
-
export declare const interactionCallback: (
|
93
|
+
export declare const interactionCallback: (interactionID: snowflake, interactionToken: string) => `interactions/${string}/${string}/callback`;
|
94
94
|
export declare const invite: (code: string) => `invites/${string}`;
|
95
|
-
export declare const stageInstance: (
|
95
|
+
export declare const stageInstance: (channelID: snowflake) => `stage-instances/${string}`;
|
96
96
|
export declare const stageInstances: () => "stage-instances";
|
97
|
-
export declare const sticker: (
|
97
|
+
export declare const sticker: (stickerID: snowflake) => `stickers/${string}`;
|
98
98
|
export declare const stickerPacks: () => "sticker-packs";
|
99
99
|
export declare const voiceRegions: () => "voice/regions";
|
@@ -3,187 +3,187 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = 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.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.guildEmojis = exports.guildEmoji = exports.guildCurrentMemberNickname = exports.guildChannels = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = exports.bulkGuildBan = void 0;
|
4
4
|
exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2CurrentAuthorization = exports.oauth2CurrentApplication = exports.oauth2Authorization = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationCurrentUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = 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 = void 0;
|
5
5
|
// Guilds
|
6
|
-
const bulkGuildBan = (
|
6
|
+
const bulkGuildBan = (guildID) => `guilds/${guildID}/bulk-ban`;
|
7
7
|
exports.bulkGuildBan = bulkGuildBan;
|
8
|
-
const guild = (
|
8
|
+
const guild = (guildID) => `guilds/${guildID}`;
|
9
9
|
exports.guild = guild;
|
10
10
|
const guilds = () => "guilds";
|
11
11
|
exports.guilds = guilds;
|
12
|
-
const guildActiveThreads = (
|
12
|
+
const guildActiveThreads = (guildID) => `guilds/${guildID}/threads/active`;
|
13
13
|
exports.guildActiveThreads = guildActiveThreads;
|
14
|
-
const guildAuditLog = (
|
14
|
+
const guildAuditLog = (guildID) => `guilds/${guildID}/audit-logs`;
|
15
15
|
exports.guildAuditLog = guildAuditLog;
|
16
|
-
const guildAutoModerationRule = (
|
16
|
+
const guildAutoModerationRule = (guildID, ruleID) => `guilds/${guildID}/auto-moderation/rules/${ruleID}`;
|
17
17
|
exports.guildAutoModerationRule = guildAutoModerationRule;
|
18
|
-
const guildAutoModerationRules = (
|
18
|
+
const guildAutoModerationRules = (guildID) => `guilds/${guildID}/auto-moderation/rules`;
|
19
19
|
exports.guildAutoModerationRules = guildAutoModerationRules;
|
20
|
-
const guildBan = (
|
20
|
+
const guildBan = (guildID, userID) => `guilds/${guildID}/bans/${userID}`;
|
21
21
|
exports.guildBan = guildBan;
|
22
|
-
const guildBans = (
|
22
|
+
const guildBans = (guildID) => `guilds/${guildID}/bans`;
|
23
23
|
exports.guildBans = guildBans;
|
24
|
-
const guildChannels = (
|
24
|
+
const guildChannels = (guildID) => `guilds/${guildID}/channels`;
|
25
25
|
exports.guildChannels = guildChannels;
|
26
|
-
const guildCurrentMemberNickname = (
|
26
|
+
const guildCurrentMemberNickname = (guildID) => `guilds/${guildID}/members/@me/nick`;
|
27
27
|
exports.guildCurrentMemberNickname = guildCurrentMemberNickname;
|
28
|
-
const guildEmoji = (
|
28
|
+
const guildEmoji = (guildID, emojiID) => `guilds/${guildID}/emojis/${emojiID}`;
|
29
29
|
exports.guildEmoji = guildEmoji;
|
30
|
-
const guildEmojis = (
|
30
|
+
const guildEmojis = (guildID) => `guilds/${guildID}/emojis`;
|
31
31
|
exports.guildEmojis = guildEmojis;
|
32
|
-
const guildIntegration = (
|
32
|
+
const guildIntegration = (guildID, integrationID) => `guilds/${guildID}/integrations/${integrationID}`;
|
33
33
|
exports.guildIntegration = guildIntegration;
|
34
|
-
const guildIntegrations = (
|
34
|
+
const guildIntegrations = (guildID) => `guilds/${guildID}/integrations`;
|
35
35
|
exports.guildIntegrations = guildIntegrations;
|
36
|
-
const guildInvites = (
|
36
|
+
const guildInvites = (guildID) => `guilds/${guildID}/invites`;
|
37
37
|
exports.guildInvites = guildInvites;
|
38
|
-
const guildMFA = (
|
38
|
+
const guildMFA = (guildID) => `guilds/${guildID}/mfa`;
|
39
39
|
exports.guildMFA = guildMFA;
|
40
|
-
const guildMember = (
|
40
|
+
const guildMember = (guildID, userID = "@me") => `guilds/${guildID}/members/${userID}`;
|
41
41
|
exports.guildMember = guildMember;
|
42
|
-
const guildMemberRole = (
|
42
|
+
const guildMemberRole = (guildID, memberID, roleID) => `guilds/${guildID}/members/${memberID}/roles/${roleID}`;
|
43
43
|
exports.guildMemberRole = guildMemberRole;
|
44
|
-
const guildMembers = (
|
44
|
+
const guildMembers = (guildID) => `guilds/${guildID}/members`;
|
45
45
|
exports.guildMembers = guildMembers;
|
46
|
-
const guildMembersSearch = (
|
46
|
+
const guildMembersSearch = (guildID) => `guilds/${guildID}/members/search`;
|
47
47
|
exports.guildMembersSearch = guildMembersSearch;
|
48
|
-
const guildMemberVerification = (
|
48
|
+
const guildMemberVerification = (guildID) => `guilds/${guildID}/member-verification`;
|
49
49
|
exports.guildMemberVerification = guildMemberVerification;
|
50
|
-
const guildOnboarding = (
|
50
|
+
const guildOnboarding = (guildID) => `guilds/${guildID}/onboarding`;
|
51
51
|
exports.guildOnboarding = guildOnboarding;
|
52
|
-
const guildPreview = (
|
52
|
+
const guildPreview = (guildID) => `guilds/${guildID}/preview`;
|
53
53
|
exports.guildPreview = guildPreview;
|
54
|
-
const guildPrune = (
|
54
|
+
const guildPrune = (guildID) => `guilds/${guildID}/prune`;
|
55
55
|
exports.guildPrune = guildPrune;
|
56
|
-
const guildRole = (
|
56
|
+
const guildRole = (guildID, roleID) => `guilds/${guildID}/roles/${roleID}`;
|
57
57
|
exports.guildRole = guildRole;
|
58
|
-
const guildRoles = (
|
58
|
+
const guildRoles = (guildID) => `guilds/${guildID}/roles`;
|
59
59
|
exports.guildRoles = guildRoles;
|
60
|
-
const guildScheduledEvent = (
|
60
|
+
const guildScheduledEvent = (guildID, guildScheduledEventID) => `guilds/${guildID}/scheduled-events/${guildScheduledEventID}`;
|
61
61
|
exports.guildScheduledEvent = guildScheduledEvent;
|
62
|
-
const guildScheduledEvents = (
|
62
|
+
const guildScheduledEvents = (guildID) => `guilds/${guildID}/scheduled-events`;
|
63
63
|
exports.guildScheduledEvents = guildScheduledEvents;
|
64
|
-
const guildScheduledEventUsers = (
|
64
|
+
const guildScheduledEventUsers = (guildID, guildScheduledEventID) => `guilds/${guildID}/scheduled-events/${guildScheduledEventID}/users`;
|
65
65
|
exports.guildScheduledEventUsers = guildScheduledEventUsers;
|
66
|
-
const guildSticker = (
|
66
|
+
const guildSticker = (guildID, stickerID) => `guilds/${guildID}/stickers/${stickerID}`;
|
67
67
|
exports.guildSticker = guildSticker;
|
68
|
-
const guildStickers = (
|
68
|
+
const guildStickers = (guildID) => `guilds/${guildID}/stickers`;
|
69
69
|
exports.guildStickers = guildStickers;
|
70
|
-
const guildTemplate = (
|
70
|
+
const guildTemplate = (guildID, code) => `guilds/${guildID}/templates/${code}`;
|
71
71
|
exports.guildTemplate = guildTemplate;
|
72
|
-
const guildTemplates = (
|
72
|
+
const guildTemplates = (guildID) => `guilds/${guildID}/templates`;
|
73
73
|
exports.guildTemplates = guildTemplates;
|
74
|
-
const guildVanityURL = (
|
74
|
+
const guildVanityURL = (guildID) => `guilds/${guildID}/vanity-url`;
|
75
75
|
exports.guildVanityURL = guildVanityURL;
|
76
|
-
const guildVoiceRegions = (
|
76
|
+
const guildVoiceRegions = (guildID) => `guilds/${guildID}/regions`;
|
77
77
|
exports.guildVoiceRegions = guildVoiceRegions;
|
78
|
-
const guildVoiceState = (
|
78
|
+
const guildVoiceState = (guildID, userID = "@me") => `guilds/${guildID}/voice-states/${userID}`;
|
79
79
|
exports.guildVoiceState = guildVoiceState;
|
80
|
-
const guildWebhooks = (
|
80
|
+
const guildWebhooks = (guildID) => `guilds/${guildID}/webhooks`;
|
81
81
|
exports.guildWebhooks = guildWebhooks;
|
82
|
-
const guildWelcomeScreen = (
|
82
|
+
const guildWelcomeScreen = (guildID) => `guilds/${guildID}/welcome-screen`;
|
83
83
|
exports.guildWelcomeScreen = guildWelcomeScreen;
|
84
|
-
const guildWidgetImage = (
|
84
|
+
const guildWidgetImage = (guildID) => `guilds/${guildID}/widget.png`;
|
85
85
|
exports.guildWidgetImage = guildWidgetImage;
|
86
|
-
const guildWidgetJSON = (
|
86
|
+
const guildWidgetJSON = (guildID) => `guilds/${guildID}/widget.json`;
|
87
87
|
exports.guildWidgetJSON = guildWidgetJSON;
|
88
|
-
const guildWidgetSettings = (
|
88
|
+
const guildWidgetSettings = (guildID) => `guilds/${guildID}/widget`;
|
89
89
|
exports.guildWidgetSettings = guildWidgetSettings;
|
90
90
|
const template = (code) => `guilds/templates/${code}`;
|
91
91
|
exports.template = template;
|
92
92
|
// Channels
|
93
|
-
const channel = (
|
93
|
+
const channel = (channelID) => `channels/${channelID}`;
|
94
94
|
exports.channel = channel;
|
95
|
-
const channelBulkDelete = (
|
95
|
+
const channelBulkDelete = (channelID) => `channels/${channelID}/messages/bulk-delete`;
|
96
96
|
exports.channelBulkDelete = channelBulkDelete;
|
97
|
-
const channelFollowers = (
|
97
|
+
const channelFollowers = (channelID) => `channels/${channelID}/followers`;
|
98
98
|
exports.channelFollowers = channelFollowers;
|
99
|
-
const channelInvites = (
|
99
|
+
const channelInvites = (channelID) => `channels/${channelID}/invites`;
|
100
100
|
exports.channelInvites = channelInvites;
|
101
|
-
const channelMessage = (
|
101
|
+
const channelMessage = (channelID, messageID) => `channels/${channelID}/messages/${messageID}`;
|
102
102
|
exports.channelMessage = channelMessage;
|
103
|
-
const channelMessageAllReactions = (
|
104
|
-
? `channels/${
|
105
|
-
: `channels/${
|
103
|
+
const channelMessageAllReactions = (channelID, messageID, emoji) => emoji
|
104
|
+
? `channels/${channelID}/messages/${messageID}/reactions/${emoji}`
|
105
|
+
: `channels/${channelID}/messages/${messageID}/reactions`;
|
106
106
|
exports.channelMessageAllReactions = channelMessageAllReactions;
|
107
|
-
const channelMessageCrosspost = (
|
107
|
+
const channelMessageCrosspost = (channelID, messageID) => `channels/${channelID}/messages/${messageID}/crosspost`;
|
108
108
|
exports.channelMessageCrosspost = channelMessageCrosspost;
|
109
|
-
const channelMessageReaction = (
|
109
|
+
const channelMessageReaction = (channelID, messageID, emoji, userID = "@me") => `channels/${channelID}/messages/${messageID}/reactions/${emoji}/${userID}`;
|
110
110
|
exports.channelMessageReaction = channelMessageReaction;
|
111
|
-
const channelMessages = (
|
111
|
+
const channelMessages = (channelID) => `channels/${channelID}/messages`;
|
112
112
|
exports.channelMessages = channelMessages;
|
113
|
-
const channelPermission = (
|
113
|
+
const channelPermission = (channelID, overwriteID) => `channels/${channelID}/permissions/${overwriteID}`;
|
114
114
|
exports.channelPermission = channelPermission;
|
115
|
-
const channelPin = (
|
115
|
+
const channelPin = (channelID, messageID) => `channels/${channelID}/pins/${messageID}`;
|
116
116
|
exports.channelPin = channelPin;
|
117
|
-
const channelPins = (
|
117
|
+
const channelPins = (channelID) => `channels/${channelID}/pins`;
|
118
118
|
exports.channelPins = channelPins;
|
119
|
-
const channelRecipient = (
|
119
|
+
const channelRecipient = (channelID, userID) => `channels/${channelID}/recipients/${userID}`;
|
120
120
|
exports.channelRecipient = channelRecipient;
|
121
|
-
const channelThreads = (
|
122
|
-
? `channels/${
|
123
|
-
: `channels/${
|
121
|
+
const channelThreads = (channelID, archivedStatus, joined) => joined
|
122
|
+
? `channels/${channelID}/users/@me/threads/archived/${archivedStatus}`
|
123
|
+
: `channels/${channelID}/threads/archived/${archivedStatus}`;
|
124
124
|
exports.channelThreads = channelThreads;
|
125
|
-
const channelTyping = (
|
125
|
+
const channelTyping = (channelID) => `channels/${channelID}/typing`;
|
126
126
|
exports.channelTyping = channelTyping;
|
127
|
-
const channelWebhooks = (
|
127
|
+
const channelWebhooks = (channelID) => `channels/${channelID}/webhooks`;
|
128
128
|
exports.channelWebhooks = channelWebhooks;
|
129
|
-
const threads = (
|
130
|
-
? `channels/${
|
131
|
-
: `channels/${
|
129
|
+
const threads = (channelID, messageID) => messageID
|
130
|
+
? `channels/${channelID}/messages/${messageID}/threads`
|
131
|
+
: `channels/${channelID}/threads`;
|
132
132
|
exports.threads = threads;
|
133
|
-
const threadMembers = (
|
134
|
-
? `channels/${
|
135
|
-
: `channels/${
|
133
|
+
const threadMembers = (threadID, userID) => userID
|
134
|
+
? `channels/${threadID}/thread-members`
|
135
|
+
: `channels/${threadID}/thread-members/${userID}`;
|
136
136
|
exports.threadMembers = threadMembers;
|
137
|
-
const pollAnswerVoters = (
|
137
|
+
const pollAnswerVoters = (channelID, messageID, answerID) => `channels/${channelID}/polls/${messageID}/answers/${answerID}`;
|
138
138
|
exports.pollAnswerVoters = pollAnswerVoters;
|
139
|
-
const pollExpire = (
|
139
|
+
const pollExpire = (channelID, messageID) => `channels/${channelID}/polls/${messageID}/expire`;
|
140
140
|
exports.pollExpire = pollExpire;
|
141
141
|
// Users
|
142
|
-
const user = (
|
142
|
+
const user = (userID = "@me") => `users/${userID}`;
|
143
143
|
exports.user = user;
|
144
|
-
const userApplicationRoleConnection = (
|
144
|
+
const userApplicationRoleConnection = (applicationID) => `users/@me/applications/${applicationID}/role-connection`;
|
145
145
|
exports.userApplicationRoleConnection = userApplicationRoleConnection;
|
146
146
|
const userChannels = () => "users/@me/channels";
|
147
147
|
exports.userChannels = userChannels;
|
148
148
|
const userConnections = () => "users/@me/connections";
|
149
149
|
exports.userConnections = userConnections;
|
150
|
-
const userGuild = (
|
150
|
+
const userGuild = (guildID) => `users/@me/guilds/${guildID}`;
|
151
151
|
exports.userGuild = userGuild;
|
152
152
|
const userGuilds = () => "users/@me/guilds";
|
153
153
|
exports.userGuilds = userGuilds;
|
154
154
|
// Applications
|
155
|
-
const applicationCommand = (
|
155
|
+
const applicationCommand = (applicationID, commandID) => `applications/${applicationID}/commands/${commandID}`;
|
156
156
|
exports.applicationCommand = applicationCommand;
|
157
|
-
const applicationCommands = (
|
157
|
+
const applicationCommands = (applicationID) => `applications/${applicationID}/commands`;
|
158
158
|
exports.applicationCommands = applicationCommands;
|
159
|
-
const applicationCommandPermissions = (
|
159
|
+
const applicationCommandPermissions = (applicationID, guildID, commandID) => `applications/${applicationID}/guilds/${guildID}/commands/${commandID}/permissions`;
|
160
160
|
exports.applicationCommandPermissions = applicationCommandPermissions;
|
161
161
|
const applicationCurrentUser = () => "applications/@me";
|
162
162
|
exports.applicationCurrentUser = applicationCurrentUser;
|
163
|
-
const applicationEntitlement = (
|
163
|
+
const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
|
164
164
|
exports.applicationEntitlement = applicationEntitlement;
|
165
|
-
const applicationEntitlementConsume = (
|
165
|
+
const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
|
166
166
|
exports.applicationEntitlementConsume = applicationEntitlementConsume;
|
167
|
-
const applicationEntitlements = (
|
167
|
+
const applicationEntitlements = (applicationID) => `applications/${applicationID}/entitlements`;
|
168
168
|
exports.applicationEntitlements = applicationEntitlements;
|
169
|
-
const applicationGuildCommand = (
|
169
|
+
const applicationGuildCommand = (applicationID, guildID, commandID) => `applications/${applicationID}/guilds/${guildID}/commands/${commandID}`;
|
170
170
|
exports.applicationGuildCommand = applicationGuildCommand;
|
171
|
-
const applicationGuildCommands = (
|
171
|
+
const applicationGuildCommands = (applicationID, guildID) => `applications/${applicationID}/guilds/${guildID}/commands`;
|
172
172
|
exports.applicationGuildCommands = applicationGuildCommands;
|
173
|
-
const applicationRoleConnectionMetadata = (
|
173
|
+
const applicationRoleConnectionMetadata = (applicationID) => `applications/${applicationID}/role-connections/metadata`;
|
174
174
|
exports.applicationRoleConnectionMetadata = applicationRoleConnectionMetadata;
|
175
|
-
const applicationSKUs = (
|
175
|
+
const applicationSKUs = (applicationID) => `applications/${applicationID}/skus`;
|
176
176
|
exports.applicationSKUs = applicationSKUs;
|
177
|
-
const guildApplicationCommandsPermissions = (
|
177
|
+
const guildApplicationCommandsPermissions = (applicationID, guildID) => `applications/${applicationID}/guilds/${guildID}/commands/permissions`;
|
178
178
|
exports.guildApplicationCommandsPermissions = guildApplicationCommandsPermissions;
|
179
179
|
// Webhooks
|
180
|
-
const webhook = (
|
181
|
-
? `webhooks/${
|
182
|
-
: `webhooks/${
|
180
|
+
const webhook = (webhookID, webhookToken) => webhookToken
|
181
|
+
? `webhooks/${webhookID}/${webhookToken}`
|
182
|
+
: `webhooks/${webhookID}`;
|
183
183
|
exports.webhook = webhook;
|
184
|
-
const webhookMessage = (
|
184
|
+
const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `webhooks/${webhookID}/${webhookToken}/messages/${messageID}`;
|
185
185
|
exports.webhookMessage = webhookMessage;
|
186
|
-
const webhookPlatform = (
|
186
|
+
const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
|
187
187
|
exports.webhookPlatform = webhookPlatform;
|
188
188
|
// Gateway
|
189
189
|
const gateway = () => "gateway";
|
@@ -202,15 +202,15 @@ exports.oauth2TokenExchange = oauth2TokenExchange;
|
|
202
202
|
const oauth2TokenRevocation = () => "oauth2/token/revoke";
|
203
203
|
exports.oauth2TokenRevocation = oauth2TokenRevocation;
|
204
204
|
// Misc
|
205
|
-
const interactionCallback = (
|
205
|
+
const interactionCallback = (interactionID, interactionToken) => `interactions/${interactionID}/${interactionToken}/callback`;
|
206
206
|
exports.interactionCallback = interactionCallback;
|
207
207
|
const invite = (code) => `invites/${code}`;
|
208
208
|
exports.invite = invite;
|
209
|
-
const stageInstance = (
|
209
|
+
const stageInstance = (channelID) => `stage-instances/${channelID}`;
|
210
210
|
exports.stageInstance = stageInstance;
|
211
211
|
const stageInstances = () => "stage-instances";
|
212
212
|
exports.stageInstances = stageInstances;
|
213
|
-
const sticker = (
|
213
|
+
const sticker = (stickerID) => `stickers/${stickerID}`;
|
214
214
|
exports.sticker = sticker;
|
215
215
|
const stickerPacks = () => "sticker-packs";
|
216
216
|
exports.stickerPacks = stickerPacks;
|
@@ -58,8 +58,8 @@ export interface RawApplicationCommandPermission {
|
|
58
58
|
export interface ApplicationCommand {
|
59
59
|
id: snowflake;
|
60
60
|
type?: ApplicationCommandTypes;
|
61
|
-
|
62
|
-
|
61
|
+
applicationID: snowflake;
|
62
|
+
guildID?: snowflake;
|
63
63
|
name: string;
|
64
64
|
nameLocalizations?: LocaleMap | null;
|
65
65
|
description: string;
|
@@ -96,8 +96,8 @@ export interface ApplicationCommandOptionChoice {
|
|
96
96
|
}
|
97
97
|
export interface GuildApplicationCommandPermissions {
|
98
98
|
id: snowflake;
|
99
|
-
|
100
|
-
|
99
|
+
applicationID: snowflake;
|
100
|
+
guildID: snowflake;
|
101
101
|
permissions: Array<ApplicationCommandPermission>;
|
102
102
|
}
|
103
103
|
export interface ApplicationCommandPermission {
|
@@ -54,9 +54,9 @@ export interface Application {
|
|
54
54
|
owner?: User;
|
55
55
|
verifyKey: string;
|
56
56
|
team: Team | null;
|
57
|
-
|
57
|
+
guildID?: snowflake;
|
58
58
|
guild?: Guild;
|
59
|
-
|
59
|
+
primarySKUID?: snowflake;
|
60
60
|
slug?: string;
|
61
61
|
coverImage?: string;
|
62
62
|
flags?: ApplicationFlags;
|
@@ -60,24 +60,24 @@ export interface AuditLog {
|
|
60
60
|
webhooks: Array<Webhook>;
|
61
61
|
}
|
62
62
|
export interface AuditLogEntry {
|
63
|
-
|
63
|
+
targetID: snowflake | null;
|
64
64
|
changes?: Array<AuditLogChange>;
|
65
|
-
|
65
|
+
userID: snowflake | null;
|
66
66
|
id: snowflake;
|
67
67
|
actionType: AuditLogEvents;
|
68
68
|
options?: OptionalAuditLogEntryInfo;
|
69
69
|
reason?: string;
|
70
70
|
}
|
71
71
|
export interface OptionalAuditLogEntryInfo {
|
72
|
-
|
72
|
+
applicationID: snowflake;
|
73
73
|
autoModerationRuleName: string;
|
74
74
|
autoModerationRuleTriggerType: string;
|
75
|
-
|
75
|
+
channelID: snowflake;
|
76
76
|
count: string;
|
77
77
|
deleteMemberDays: string;
|
78
78
|
id: snowflake;
|
79
79
|
membersRemoved: string;
|
80
|
-
|
80
|
+
messageID: snowflake;
|
81
81
|
roleName: string;
|
82
82
|
type: string;
|
83
83
|
integrationType: string;
|
@@ -36,9 +36,9 @@ export interface RawActionMetadata {
|
|
36
36
|
}
|
37
37
|
export interface AutoModerationRule {
|
38
38
|
id: snowflake;
|
39
|
-
|
39
|
+
guildID: snowflake;
|
40
40
|
name: string;
|
41
|
-
|
41
|
+
creatorID: snowflake;
|
42
42
|
eventType: EventTypes;
|
43
43
|
triggerType: TriggerTypes;
|
44
44
|
triggerMetadata: TriggerMetadata;
|
@@ -60,7 +60,7 @@ export interface AutoModerationAction {
|
|
60
60
|
metadata: ActionMetadata;
|
61
61
|
}
|
62
62
|
export interface ActionMetadata {
|
63
|
-
|
63
|
+
channelID: snowflake;
|
64
64
|
durationSeconds: number;
|
65
65
|
customMessage?: string;
|
66
66
|
}
|