disgroove 2.2.1-dev.64c7abc → 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 +224 -227
- package/dist/lib/Client.js +402 -401
- package/dist/lib/constants.d.ts +5 -4
- package/dist/lib/constants.js +5 -4
- package/dist/lib/gateway/Shard.d.ts +14 -9
- package/dist/lib/gateway/Shard.js +157 -108
- 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 +151 -67
- 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
@@ -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
|
}
|
@@ -232,6 +232,7 @@ export interface RawEmbedField {
|
|
232
232
|
export interface RawAttachment {
|
233
233
|
id: snowflake;
|
234
234
|
filename: string;
|
235
|
+
title?: string;
|
235
236
|
description?: string;
|
236
237
|
content_type?: string;
|
237
238
|
size: number;
|
@@ -268,22 +269,22 @@ export interface RawRoleSubscriptionData {
|
|
268
269
|
export interface Channel {
|
269
270
|
id: snowflake;
|
270
271
|
type: ChannelTypes;
|
271
|
-
|
272
|
+
guildID?: snowflake;
|
272
273
|
position?: number;
|
273
274
|
permissionOverwrites?: Array<Overwrite>;
|
274
275
|
name?: string | null;
|
275
276
|
topic?: string | null;
|
276
277
|
nsfw?: boolean;
|
277
|
-
|
278
|
+
lastMessageID?: snowflake | null;
|
278
279
|
bitrate?: number;
|
279
280
|
userLimit?: number;
|
280
281
|
rateLimitPerUser?: number;
|
281
282
|
recipients?: Array<User>;
|
282
283
|
icon?: string | null;
|
283
|
-
|
284
|
-
|
284
|
+
ownerID?: snowflake;
|
285
|
+
applicationID?: snowflake;
|
285
286
|
managed?: boolean;
|
286
|
-
|
287
|
+
parentID?: snowflake | null;
|
287
288
|
lastPinTimestamp?: timestamp | null;
|
288
289
|
rtcRegion?: string | null;
|
289
290
|
videoQualityMode?: VideoQualityModes;
|
@@ -304,7 +305,7 @@ export interface Channel {
|
|
304
305
|
}
|
305
306
|
export interface Message {
|
306
307
|
id: snowflake;
|
307
|
-
|
308
|
+
channelID: snowflake;
|
308
309
|
author: User;
|
309
310
|
content: string;
|
310
311
|
timestamp: timestamp;
|
@@ -319,11 +320,11 @@ export interface Message {
|
|
319
320
|
reactions?: Array<Reaction>;
|
320
321
|
nonce?: number | string;
|
321
322
|
pinned: boolean;
|
322
|
-
|
323
|
+
webhookID?: snowflake;
|
323
324
|
type: MessageTypes;
|
324
325
|
activity?: MessageActivity;
|
325
326
|
application?: Application;
|
326
|
-
|
327
|
+
applicationID?: snowflake;
|
327
328
|
messageReference?: MessageReference;
|
328
329
|
flags?: MessageFlags;
|
329
330
|
referencedMessage?: Message | null;
|
@@ -341,15 +342,15 @@ export interface Message {
|
|
341
342
|
}
|
342
343
|
export interface MessageActivity {
|
343
344
|
type: MessageActivityTypes;
|
344
|
-
|
345
|
+
partyID?: string;
|
345
346
|
}
|
346
347
|
export interface MessageInteractionMetadata {
|
347
348
|
id: snowflake;
|
348
349
|
type: InteractionType;
|
349
350
|
user: User;
|
350
351
|
authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
|
351
|
-
|
352
|
-
|
352
|
+
originalResponseMessageID?: snowflake;
|
353
|
+
interactedMessageID?: snowflake;
|
353
354
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
354
355
|
}
|
355
356
|
export interface MessageCall {
|
@@ -357,14 +358,14 @@ export interface MessageCall {
|
|
357
358
|
endedTimestamp?: timestamp | null;
|
358
359
|
}
|
359
360
|
export interface MessageReference {
|
360
|
-
|
361
|
-
|
362
|
-
|
361
|
+
messageID?: snowflake;
|
362
|
+
channelID?: snowflake;
|
363
|
+
guildID?: snowflake;
|
363
364
|
failIfNotExists?: boolean;
|
364
365
|
}
|
365
366
|
export interface FollowedChannel {
|
366
|
-
|
367
|
-
|
367
|
+
channelID: snowflake;
|
368
|
+
webhookID: snowflake;
|
368
369
|
}
|
369
370
|
export interface Reaction {
|
370
371
|
count: number;
|
@@ -394,20 +395,20 @@ export interface ThreadMetadata {
|
|
394
395
|
}
|
395
396
|
export interface ThreadMember {
|
396
397
|
id?: snowflake;
|
397
|
-
|
398
|
+
userID?: snowflake;
|
398
399
|
joinTimestamp: timestamp;
|
399
400
|
flags: number;
|
400
401
|
member?: GuildMember;
|
401
402
|
}
|
402
403
|
export interface DefaultReaction {
|
403
|
-
|
404
|
+
emojiID: snowflake | null;
|
404
405
|
emojiName: string | null;
|
405
406
|
}
|
406
407
|
export interface ForumTag {
|
407
408
|
id: snowflake;
|
408
409
|
name: string;
|
409
410
|
moderated: boolean;
|
410
|
-
|
411
|
+
emojiID?: snowflake;
|
411
412
|
emojiName?: string;
|
412
413
|
}
|
413
414
|
export interface Embed {
|
@@ -466,6 +467,7 @@ export interface EmbedField {
|
|
466
467
|
export interface Attachment {
|
467
468
|
id: snowflake;
|
468
469
|
filename: string;
|
470
|
+
title?: string;
|
469
471
|
description?: string;
|
470
472
|
contentType?: string;
|
471
473
|
size: number;
|
@@ -480,7 +482,7 @@ export interface Attachment {
|
|
480
482
|
}
|
481
483
|
export interface ChannelMention {
|
482
484
|
id: snowflake;
|
483
|
-
|
485
|
+
guildID: snowflake;
|
484
486
|
type: ChannelTypes;
|
485
487
|
name: string;
|
486
488
|
}
|
@@ -491,7 +493,7 @@ export interface AllowedMentions {
|
|
491
493
|
repliedUser: boolean;
|
492
494
|
}
|
493
495
|
export interface RoleSubscriptionData {
|
494
|
-
|
496
|
+
roleSubscriptionListingID: snowflake;
|
495
497
|
tierName: string;
|
496
498
|
totalMonthsSubscribed: number;
|
497
499
|
isRenewal: boolean;
|
@@ -18,16 +18,16 @@ export interface RawEntitlement {
|
|
18
18
|
}
|
19
19
|
export interface Entitlement {
|
20
20
|
id: snowflake;
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
skuID: snowflake;
|
22
|
+
applicationID: snowflake;
|
23
|
+
userID?: snowflake;
|
24
|
+
promotionID?: snowflake | null;
|
25
25
|
type: EntitlementTypes;
|
26
26
|
deleted: boolean;
|
27
27
|
giftCodeFlags?: number;
|
28
28
|
consumed?: boolean;
|
29
29
|
startsAt?: timestamp;
|
30
30
|
endsAt?: timestamp;
|
31
|
-
|
32
|
-
|
31
|
+
guildID?: snowflake;
|
32
|
+
subscriptionID?: string;
|
33
33
|
}
|