disgroove 2.0.0-dev.40377cb → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/lib/Client.d.ts +560 -142
- package/dist/lib/Client.js +1794 -124
- package/dist/lib/Client.js.map +1 -1
- package/dist/lib/constants.d.ts +7 -7
- package/dist/lib/constants.js +218 -218
- package/dist/lib/gateway/Shard.d.ts +0 -1
- package/dist/lib/gateway/Shard.js +65 -261
- package/dist/lib/gateway/Shard.js.map +1 -1
- package/dist/lib/gateway/ShardManager.d.ts +1 -2
- package/dist/lib/gateway/ShardManager.js +1 -2
- package/dist/lib/gateway/ShardManager.js.map +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/rest/Endpoints.d.ts +3 -3
- package/dist/lib/rest/Endpoints.js +8 -8
- package/dist/lib/rest/Endpoints.js.map +1 -1
- package/dist/lib/rest/RequestManager.d.ts +8 -2
- package/dist/lib/rest/RequestManager.js +17 -10
- package/dist/lib/rest/RequestManager.js.map +1 -1
- package/dist/lib/rest/index.d.ts +0 -1
- package/dist/lib/rest/index.js +0 -1
- package/dist/lib/rest/index.js.map +1 -1
- package/dist/lib/structures/Webhook.js +14 -3
- package/dist/lib/structures/Webhook.js.map +1 -1
- package/dist/lib/types/application-command.d.ts +94 -20
- package/dist/lib/types/application-role-connection-metadata.d.ts +7 -6
- package/dist/lib/types/application.d.ts +24 -13
- package/dist/lib/types/audit-log.d.ts +15 -16
- package/dist/lib/types/auto-moderation.d.ts +27 -7
- package/dist/lib/types/channel.d.ts +170 -68
- package/dist/lib/types/emoji.d.ts +12 -3
- package/dist/lib/types/entitlements.d.ts +6 -1
- package/dist/lib/types/gateway-events.d.ts +11 -336
- package/dist/lib/types/guild-scheduled-event.d.ts +31 -8
- package/dist/lib/types/guild-template.d.ts +16 -4
- package/dist/lib/types/guild.d.ts +190 -37
- package/dist/lib/types/index.d.ts +2 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/interaction.d.ts +37 -36
- package/dist/lib/types/invite.d.ts +12 -12
- package/dist/lib/types/message-components.d.ts +12 -12
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +8 -8
- package/dist/lib/types/stage-instance.d.ts +12 -1
- package/dist/lib/types/sticker.d.ts +18 -6
- package/dist/lib/types/team.d.ts +5 -5
- package/dist/lib/types/user.d.ts +30 -7
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +38 -6
- package/dist/lib/utils/Util.d.ts +2 -13
- package/dist/lib/utils/Util.js +39 -535
- package/dist/lib/utils/Util.js.map +1 -1
- package/dist/lib/utils/errors.d.ts +1 -1
- package/dist/lib/utils/errors.js +4 -4
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/package.json +7 -7
- package/package.json +7 -7
@@ -1,6 +1,5 @@
|
|
1
|
-
import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes } from "../constants";
|
2
|
-
import type { RawChannel, RawEmoji, RawSticker, RawUser, RawRole,
|
3
|
-
import { Collection } from "../utils";
|
1
|
+
import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes, ChannelTypes, VideoQualityModes, SortOrderTypes, ForumLayoutTypes } from "../constants";
|
2
|
+
import type { RawChannel, RawEmoji, RawSticker, RawUser, RawRole, Emoji, Sticker, User, Role, Channel, Overwrite, DefaultReaction, ForumTag } from ".";
|
4
3
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
5
4
|
export interface RawGuild {
|
6
5
|
id: string;
|
@@ -174,7 +173,7 @@ export interface RawPromptOption {
|
|
174
173
|
title: string;
|
175
174
|
description: string | null;
|
176
175
|
}
|
177
|
-
export interface
|
176
|
+
export interface Guild {
|
178
177
|
id: string;
|
179
178
|
name: string;
|
180
179
|
icon: string | null;
|
@@ -192,8 +191,8 @@ export interface JSONGuild {
|
|
192
191
|
verificationLevel: VerificationLevel;
|
193
192
|
defaultMessageNotifications: DefaultMessageNotificationLevel;
|
194
193
|
explicitContentFilter: ExplicitContentFilterLevel;
|
195
|
-
roles:
|
196
|
-
emojis:
|
194
|
+
roles: Array<Role>;
|
195
|
+
emojis: Array<Emoji>;
|
197
196
|
features: Array<GuildFeatures>;
|
198
197
|
mfaLevel: MFALevel;
|
199
198
|
applicationId: string | null;
|
@@ -202,7 +201,7 @@ export interface JSONGuild {
|
|
202
201
|
rulesChannelId: string | null;
|
203
202
|
maxPresences?: number | null;
|
204
203
|
maxMembers?: number;
|
205
|
-
|
204
|
+
vanityUrlCode: string | null;
|
206
205
|
description: string | null;
|
207
206
|
banner: string | null;
|
208
207
|
premiumTier: PremiumTier;
|
@@ -213,43 +212,43 @@ export interface JSONGuild {
|
|
213
212
|
maxStageVideoChannelUsers?: number;
|
214
213
|
approximateMemberCount?: number;
|
215
214
|
approximatePresenceCount?: number;
|
216
|
-
welcomeScreen?:
|
215
|
+
welcomeScreen?: WelcomeScreen;
|
217
216
|
nsfwLevel: GuildNSFWLevel;
|
218
|
-
stickers?: Array<
|
217
|
+
stickers?: Array<Sticker>;
|
219
218
|
premiumProgressBarEnabled: boolean;
|
220
219
|
safetyAlertsChannelId: string | null;
|
221
220
|
}
|
222
|
-
export interface
|
221
|
+
export interface UnavailableGuild {
|
223
222
|
id: string;
|
224
223
|
unavailable: boolean;
|
225
224
|
}
|
226
|
-
export interface
|
225
|
+
export interface GuildPreview {
|
227
226
|
id: string;
|
228
227
|
name: string;
|
229
228
|
icon: string | null;
|
230
229
|
splash: string | null;
|
231
230
|
discoverySplash: string | null;
|
232
|
-
emojis: Array<
|
231
|
+
emojis: Array<Emoji>;
|
233
232
|
features: Array<GuildFeatures>;
|
234
233
|
approximateMemberCount?: number;
|
235
234
|
approximatePresenceCount?: number;
|
236
235
|
description: string | null;
|
237
|
-
stickers?: Array<
|
236
|
+
stickers?: Array<Sticker>;
|
238
237
|
}
|
239
|
-
export interface
|
238
|
+
export interface GuildWidgetSettings {
|
240
239
|
enabled: boolean;
|
241
240
|
channelId: string | null;
|
242
241
|
}
|
243
|
-
export interface
|
242
|
+
export interface GuildWidget {
|
244
243
|
id: string;
|
245
244
|
name: string;
|
246
245
|
instantInvite: string | null;
|
247
|
-
channels: Array<
|
248
|
-
members: Array<
|
246
|
+
channels: Array<Channel>;
|
247
|
+
members: Array<User>;
|
249
248
|
presenceCount: number;
|
250
249
|
}
|
251
|
-
export interface
|
252
|
-
user?:
|
250
|
+
export interface GuildMember {
|
251
|
+
user?: User;
|
253
252
|
nick?: string | null;
|
254
253
|
avatar?: string | null;
|
255
254
|
roles: Array<string>;
|
@@ -262,7 +261,7 @@ export interface JSONGuildMember {
|
|
262
261
|
permissions?: string;
|
263
262
|
communicationDisabledUntil?: number | null;
|
264
263
|
}
|
265
|
-
export interface
|
264
|
+
export interface Integration {
|
266
265
|
id: string;
|
267
266
|
name: string;
|
268
267
|
type: string;
|
@@ -272,63 +271,217 @@ export interface JSONIntegration {
|
|
272
271
|
enableEmoticons?: boolean;
|
273
272
|
expireBehavior?: IntegrationExpireBehaviors;
|
274
273
|
expireGracePeriod?: number;
|
275
|
-
user?:
|
276
|
-
account:
|
274
|
+
user?: User;
|
275
|
+
account: IntegrationAccount;
|
277
276
|
syncedAt?: string;
|
278
277
|
subscriberCount?: number;
|
279
278
|
revoked?: boolean;
|
280
|
-
application?:
|
279
|
+
application?: IntegrationApplication;
|
281
280
|
scopes?: Array<OAuth2Scopes>;
|
282
281
|
}
|
283
|
-
export interface
|
282
|
+
export interface IntegrationAccount {
|
284
283
|
id: string;
|
285
284
|
name: string;
|
286
285
|
}
|
287
|
-
export interface
|
286
|
+
export interface IntegrationApplication {
|
288
287
|
id: string;
|
289
288
|
name: string;
|
290
289
|
icon: string | null;
|
291
290
|
description: string;
|
292
|
-
bot?:
|
291
|
+
bot?: User;
|
293
292
|
}
|
294
|
-
export interface
|
293
|
+
export interface Ban {
|
295
294
|
reason: string | null;
|
296
|
-
user:
|
295
|
+
user: User;
|
297
296
|
}
|
298
|
-
export interface
|
297
|
+
export interface WelcomeScreen {
|
299
298
|
description: string | null;
|
300
|
-
welcomeChannels: Array<
|
299
|
+
welcomeChannels: Array<WelcomeScreenChannel>;
|
301
300
|
}
|
302
|
-
export interface
|
301
|
+
export interface WelcomeScreenChannel {
|
303
302
|
channelId: string;
|
304
303
|
description: string;
|
305
304
|
emojiId: string | null;
|
306
305
|
emojiName: string | null;
|
307
306
|
}
|
308
|
-
export interface
|
307
|
+
export interface GuildOnboarding {
|
309
308
|
guildId: string;
|
310
|
-
prompts: Array<
|
309
|
+
prompts: Array<OnboardingPrompt>;
|
311
310
|
defaultChannelIds: Array<string>;
|
312
311
|
enabled: boolean;
|
313
312
|
mode: OnboardingMode;
|
314
313
|
}
|
315
|
-
export interface
|
314
|
+
export interface OnboardingPrompt {
|
316
315
|
id: string;
|
317
316
|
type: PromptTypes;
|
318
|
-
options: Array<
|
317
|
+
options: Array<PromptOption>;
|
319
318
|
title: string;
|
320
319
|
singleSelect: boolean;
|
321
320
|
required: boolean;
|
322
321
|
inOnboarding: boolean;
|
323
322
|
}
|
324
|
-
export interface
|
323
|
+
export interface PromptOption {
|
325
324
|
id: string;
|
326
325
|
channelIds: Array<string>;
|
327
326
|
roleIds: Array<string>;
|
328
|
-
emoji?:
|
327
|
+
emoji?: Emoji;
|
329
328
|
emojiId?: string;
|
330
329
|
emojiName?: string;
|
331
330
|
emojiAnimated?: boolean;
|
332
331
|
title: string;
|
333
332
|
description: string | null;
|
334
333
|
}
|
334
|
+
export interface CreateGuildParams {
|
335
|
+
name: string;
|
336
|
+
region?: string | null;
|
337
|
+
icon?: string;
|
338
|
+
verificationLevel?: VerificationLevel;
|
339
|
+
defaultMessageNotifications?: DefaultMessageNotificationLevel;
|
340
|
+
explicitContentFilter?: ExplicitContentFilterLevel;
|
341
|
+
roles?: Array<{
|
342
|
+
name?: string;
|
343
|
+
permissions?: string;
|
344
|
+
color?: number;
|
345
|
+
hoist?: boolean;
|
346
|
+
icon?: string | null;
|
347
|
+
unicodeEmoji?: string | null;
|
348
|
+
mentionable?: boolean;
|
349
|
+
}>;
|
350
|
+
channels?: Array<{
|
351
|
+
name: string;
|
352
|
+
type: ChannelTypes;
|
353
|
+
id?: number;
|
354
|
+
parentId?: number;
|
355
|
+
}>;
|
356
|
+
afkChannelId?: string;
|
357
|
+
afkTimeout?: number;
|
358
|
+
systemChannelId?: string;
|
359
|
+
systemChannelFlags?: SystemChannelFlags;
|
360
|
+
}
|
361
|
+
export interface EditGuildParams {
|
362
|
+
name?: string;
|
363
|
+
region?: string | null;
|
364
|
+
verificationLevel?: VerificationLevel;
|
365
|
+
defaultMessageNotifications?: DefaultMessageNotificationLevel;
|
366
|
+
explicitContentFilter?: ExplicitContentFilterLevel;
|
367
|
+
afkChannelId?: string | null;
|
368
|
+
afkTimeout?: number;
|
369
|
+
icon?: string | null;
|
370
|
+
ownerId?: string;
|
371
|
+
splash?: string | null;
|
372
|
+
discoverySplash?: string | null;
|
373
|
+
banner?: string | null;
|
374
|
+
systemChannelId?: string | null;
|
375
|
+
systemChannelFlags?: SystemChannelFlags;
|
376
|
+
rulesChannelId?: string | null;
|
377
|
+
publicUpdatesChannelId?: string | null;
|
378
|
+
preferredLocale?: string;
|
379
|
+
features?: Array<GuildFeatures>;
|
380
|
+
description?: string | null;
|
381
|
+
premiumProgressBarEnabled?: boolean;
|
382
|
+
safetyAlertsChannelId?: string | null;
|
383
|
+
}
|
384
|
+
export interface CreateGuildChannelParams {
|
385
|
+
name: string | null;
|
386
|
+
type?: ChannelTypes;
|
387
|
+
topic?: string | null;
|
388
|
+
bitrate?: number;
|
389
|
+
userLimit?: number;
|
390
|
+
rateLimitPerUser?: number;
|
391
|
+
position?: number;
|
392
|
+
permissionOverwrites?: Array<Overwrite>;
|
393
|
+
parentId?: string | null;
|
394
|
+
nsfw?: boolean;
|
395
|
+
rtcRegion?: string | null;
|
396
|
+
videoQualityMode?: VideoQualityModes;
|
397
|
+
defaultAutoArchiveDuration?: number;
|
398
|
+
defaultReactionEmoji?: DefaultReaction | null;
|
399
|
+
availableTags?: Array<ForumTag>;
|
400
|
+
defaultSortOrder?: SortOrderTypes | null;
|
401
|
+
defaultForumLayout?: ForumLayoutTypes;
|
402
|
+
defaultThreadRateLimitPerUser?: number;
|
403
|
+
}
|
404
|
+
export type EditGuildChannelPositionsParams = Array<{
|
405
|
+
id: string;
|
406
|
+
position?: number | null;
|
407
|
+
lockPermissions?: boolean | null;
|
408
|
+
parentId?: string | null;
|
409
|
+
}>;
|
410
|
+
export interface AddGuildMemberParams {
|
411
|
+
accessToken: string;
|
412
|
+
nick?: string;
|
413
|
+
roles?: Array<string>;
|
414
|
+
mute?: boolean;
|
415
|
+
deaf?: boolean;
|
416
|
+
}
|
417
|
+
export interface EditCurrentGuildMemberParams {
|
418
|
+
nick?: string;
|
419
|
+
}
|
420
|
+
export interface EditGuildMemberParams {
|
421
|
+
nick?: string | null;
|
422
|
+
roles?: Array<string> | null;
|
423
|
+
mute?: boolean | null;
|
424
|
+
deaf?: boolean | null;
|
425
|
+
channelId?: string | null;
|
426
|
+
communicationDisabledUntil?: number | null;
|
427
|
+
flags?: GuildMemberFlags;
|
428
|
+
}
|
429
|
+
export interface EditGuildMemberParams {
|
430
|
+
nick?: string | null;
|
431
|
+
}
|
432
|
+
export interface CreateGuildBanParams {
|
433
|
+
deleteMessageDays?: number;
|
434
|
+
deleteMessageSeconds?: number;
|
435
|
+
}
|
436
|
+
export interface CreateGuildRoleParams {
|
437
|
+
name?: string;
|
438
|
+
permissions?: string;
|
439
|
+
color?: number;
|
440
|
+
hoist?: boolean;
|
441
|
+
icon?: string | null;
|
442
|
+
unicodeEmoji?: string | null;
|
443
|
+
mentionable?: boolean;
|
444
|
+
}
|
445
|
+
export type EditGuildRolePositionsParams = Array<{
|
446
|
+
id: string;
|
447
|
+
position?: number | null;
|
448
|
+
}>;
|
449
|
+
export interface EditGuildRoleParams {
|
450
|
+
name?: string | null;
|
451
|
+
permissions?: string | null;
|
452
|
+
color?: number | null;
|
453
|
+
hoist?: boolean | null;
|
454
|
+
icon?: string | null;
|
455
|
+
unicodeEmoji?: string | null;
|
456
|
+
mentionable?: boolean | null;
|
457
|
+
}
|
458
|
+
export interface EditGuildMFALevelParams {
|
459
|
+
level: MFALevel;
|
460
|
+
}
|
461
|
+
export interface BeginGuildPruneParams {
|
462
|
+
days: number;
|
463
|
+
computePruneCount: boolean;
|
464
|
+
includeRoles: Array<string>;
|
465
|
+
reason?: string;
|
466
|
+
}
|
467
|
+
export interface EditGuildWelcomeScreenParams {
|
468
|
+
enabled?: boolean | null;
|
469
|
+
welcomeChannels?: Array<WelcomeScreenChannel> | null;
|
470
|
+
description?: string | null;
|
471
|
+
}
|
472
|
+
export interface EditGuildOnboardingParams {
|
473
|
+
prompts: Array<OnboardingPrompt>;
|
474
|
+
defaultChannelIds: Array<string>;
|
475
|
+
enabled: boolean;
|
476
|
+
mode: OnboardingMode;
|
477
|
+
}
|
478
|
+
export interface EditCurrentUserVoiceStateParams {
|
479
|
+
channelId?: string;
|
480
|
+
suppress?: boolean;
|
481
|
+
requestToSpeakTimestamp?: string | null;
|
482
|
+
}
|
483
|
+
export interface EditUserVoiceStateParams {
|
484
|
+
channelId?: string;
|
485
|
+
suppress?: boolean;
|
486
|
+
requestToSpeakTimestamp?: string | null;
|
487
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Locales } from "../constants";
|
1
2
|
export * from "./application-command";
|
2
3
|
export * from "./application-role-connection-metadata";
|
3
4
|
export * from "./application";
|
@@ -21,3 +22,4 @@ export * from "./team";
|
|
21
22
|
export * from "./user";
|
22
23
|
export * from "./voice";
|
23
24
|
export * from "./webhook";
|
25
|
+
export type LocaleMap = Partial<Record<Locales, string>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,wDAAsC;AACtC,yEAAuD;AACvD,gDAA8B;AAC9B,8CAA4B;AAC5B,oDAAkC;AAClC,4CAA0B;AAC1B,0CAAwB;AACxB,iDAA+B;AAC/B,mDAAiC;AACjC,0DAAwC;AACxC,mDAAiC;AACjC,0CAAwB;AACxB,gDAA8B;AAC9B,2CAAyB;AACzB,uDAAqC;AACrC,yCAAuB;AACvB,wCAAsB;AACtB,mDAAiC;AACjC,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"}
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole,
|
1
|
+
import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole, Attachment, User, GuildMember, Message, Role, Channel, Entitlement, RawEntitlement, RawEmbed, RawAllowedMentions, RawActionRow, RawApplicationCommandOptionChoice, Embed, AllowedMentions, ActionRow, ApplicationCommandOptionChoice, RawTextInput, TextInput, ExecuteWebhookParams } from ".";
|
2
2
|
import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
|
3
3
|
import type { File } from "../rest";
|
4
|
-
import { Collection } from "../utils";
|
5
4
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
|
6
5
|
export interface RawInteraction {
|
7
6
|
id: string;
|
@@ -90,82 +89,84 @@ export interface RawInteractionCallbackData {
|
|
90
89
|
custom_id?: string;
|
91
90
|
title?: string;
|
92
91
|
}
|
93
|
-
export interface
|
92
|
+
export interface Interaction {
|
94
93
|
id: string;
|
95
94
|
applicationId: string;
|
96
95
|
type: InteractionType;
|
97
|
-
data?:
|
96
|
+
data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
|
98
97
|
guildId?: string;
|
99
|
-
channel?:
|
98
|
+
channel?: Channel;
|
100
99
|
channelId?: string;
|
101
|
-
member?:
|
102
|
-
user?:
|
100
|
+
member?: GuildMember;
|
101
|
+
user?: User;
|
103
102
|
token: string;
|
104
103
|
version: number;
|
105
|
-
message?:
|
104
|
+
message?: Message;
|
106
105
|
appPermissions?: string;
|
107
106
|
locale?: string;
|
108
107
|
guildLocale?: string;
|
109
|
-
entitlements: Array<
|
108
|
+
entitlements: Array<Entitlement>;
|
110
109
|
}
|
111
|
-
export interface
|
110
|
+
export interface ApplicationCommandData {
|
112
111
|
id: string;
|
113
112
|
name: string;
|
114
113
|
type: ApplicationCommandTypes;
|
115
|
-
resolved?:
|
116
|
-
options?: Array<
|
114
|
+
resolved?: ResolvedData;
|
115
|
+
options?: Array<ApplicationCommandInteractionDataOption>;
|
117
116
|
guildId?: string;
|
118
117
|
targetId?: string;
|
119
118
|
}
|
120
|
-
export interface
|
119
|
+
export interface MessageComponentData {
|
121
120
|
customId: string;
|
122
121
|
componentType: ComponentTypes;
|
123
122
|
values?: Array<string>;
|
124
|
-
resolved?:
|
123
|
+
resolved?: ResolvedData;
|
125
124
|
}
|
126
|
-
export interface
|
125
|
+
export interface ModalSubmitData {
|
127
126
|
customId: string;
|
128
127
|
components: Array<{
|
129
128
|
type: ComponentTypes.ActionRow;
|
130
|
-
components: Array<
|
129
|
+
components: Array<TextInput>;
|
131
130
|
}>;
|
132
131
|
}
|
133
|
-
export interface
|
134
|
-
users?:
|
135
|
-
members?:
|
136
|
-
roles?:
|
137
|
-
channels?:
|
138
|
-
messages?:
|
139
|
-
attachments?:
|
132
|
+
export interface ResolvedData {
|
133
|
+
users?: Record<string, User>;
|
134
|
+
members?: Record<string, GuildMember>;
|
135
|
+
roles?: Record<string, Role>;
|
136
|
+
channels?: Record<string, Channel>;
|
137
|
+
messages?: Record<string, Message>;
|
138
|
+
attachments?: Record<string, Attachment>;
|
140
139
|
}
|
141
|
-
export interface
|
140
|
+
export interface ApplicationCommandInteractionDataOption {
|
142
141
|
name: string;
|
143
142
|
type: ApplicationCommandOptionType;
|
144
143
|
value?: string | number | boolean;
|
145
|
-
options?: Array<
|
144
|
+
options?: Array<ApplicationCommandInteractionDataOption>;
|
146
145
|
focused?: boolean;
|
147
146
|
}
|
148
|
-
export interface
|
147
|
+
export interface MessageInteraction {
|
149
148
|
id: string;
|
150
149
|
type: InteractionType;
|
151
150
|
name: string;
|
152
|
-
user:
|
153
|
-
member?:
|
151
|
+
user: User;
|
152
|
+
member?: GuildMember;
|
154
153
|
}
|
155
|
-
export interface
|
154
|
+
export interface InteractionResponse {
|
156
155
|
type: InteractionCallbackType;
|
157
|
-
data?:
|
156
|
+
data?: InteractionCallbackData;
|
158
157
|
}
|
159
|
-
export interface
|
158
|
+
export interface InteractionCallbackData {
|
160
159
|
tts?: boolean;
|
161
160
|
content?: string;
|
162
|
-
embeds?: Array<
|
163
|
-
allowedMentions?:
|
161
|
+
embeds?: Array<Embed>;
|
162
|
+
allowedMentions?: AllowedMentions;
|
164
163
|
flags?: MessageFlags;
|
165
|
-
components?: Array<
|
166
|
-
attachments?: Array<
|
164
|
+
components?: Array<ActionRow>;
|
165
|
+
attachments?: Array<Attachment>;
|
167
166
|
files?: Array<File>;
|
168
|
-
choices?: Array<
|
167
|
+
choices?: Array<ApplicationCommandOptionChoice>;
|
169
168
|
customId?: string;
|
170
169
|
title?: string;
|
171
170
|
}
|
171
|
+
export interface CreateInteractionFollowupMessageParams extends Omit<ExecuteWebhookParams, "threadId" | "avatarUrl" | "username"> {
|
172
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Application, Channel, Guild, GuildMember, GuildScheduledEvent, User, RawApplication, RawChannel, RawGuild, RawGuildMember, RawGuildScheduledEvent, RawUser } from ".";
|
2
2
|
import type { InviteTargetTypes } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-structure */
|
4
4
|
export interface RawInvite {
|
@@ -30,29 +30,29 @@ export interface RawInviteStageInstance {
|
|
30
30
|
speaker_count: number;
|
31
31
|
topic: string;
|
32
32
|
}
|
33
|
-
export interface
|
33
|
+
export interface Invite {
|
34
34
|
code: string;
|
35
|
-
guild?:
|
36
|
-
channel:
|
37
|
-
inviter?:
|
35
|
+
guild?: Guild;
|
36
|
+
channel: Channel;
|
37
|
+
inviter?: User;
|
38
38
|
targetType?: InviteTargetTypes;
|
39
|
-
targetUser?:
|
40
|
-
targetApplication?:
|
39
|
+
targetUser?: User;
|
40
|
+
targetApplication?: Application;
|
41
41
|
approximatePresenceCount?: number;
|
42
42
|
approximateMemberCount?: number;
|
43
43
|
expiresAt?: string | null;
|
44
|
-
stageInstance?:
|
45
|
-
guildScheduledEvent?:
|
44
|
+
stageInstance?: InviteStageInstance;
|
45
|
+
guildScheduledEvent?: GuildScheduledEvent;
|
46
46
|
}
|
47
|
-
export interface
|
47
|
+
export interface InviteMetadata {
|
48
48
|
uses: number;
|
49
49
|
maxUses: number;
|
50
50
|
maxAge: number;
|
51
51
|
temporary: boolean;
|
52
52
|
createdAt: string;
|
53
53
|
}
|
54
|
-
export interface
|
55
|
-
members: Array<
|
54
|
+
export interface InviteStageInstance {
|
55
|
+
members: Array<GuildMember>;
|
56
56
|
participantCount: number;
|
57
57
|
speakerCount: number;
|
58
58
|
topic: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Emoji, RawEmoji } from ".";
|
2
2
|
import type { ButtonStyles, ChannelTypes, ComponentTypes, TextInputStyles } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-structure */
|
4
4
|
export interface RawButton {
|
@@ -52,38 +52,38 @@ export interface RawActionRow {
|
|
52
52
|
type: ComponentTypes.ActionRow;
|
53
53
|
components: Array<RawButton | RawSelectMenu | RawTextInput>;
|
54
54
|
}
|
55
|
-
export interface
|
55
|
+
export interface Button {
|
56
56
|
type: ComponentTypes.Button;
|
57
57
|
style: ButtonStyles;
|
58
58
|
label?: string;
|
59
|
-
emoji?: Pick<
|
59
|
+
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
60
60
|
customId?: string;
|
61
61
|
url?: string;
|
62
62
|
disabled?: boolean;
|
63
63
|
}
|
64
|
-
export interface
|
64
|
+
export interface SelectMenu {
|
65
65
|
type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
|
66
66
|
customId: string;
|
67
|
-
options?: Array<
|
67
|
+
options?: Array<SelectOption>;
|
68
68
|
channelTypes?: Array<ChannelTypes>;
|
69
69
|
placeholder?: string;
|
70
|
-
defaultValues?: Array<
|
70
|
+
defaultValues?: Array<DefaultValue>;
|
71
71
|
minValues?: number;
|
72
72
|
maxValues?: number;
|
73
73
|
disabled?: boolean;
|
74
74
|
}
|
75
|
-
export interface
|
75
|
+
export interface SelectOption {
|
76
76
|
label: string;
|
77
77
|
value: string;
|
78
78
|
description?: string;
|
79
|
-
emoji?: Pick<
|
79
|
+
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
80
80
|
default?: boolean;
|
81
81
|
}
|
82
|
-
export interface
|
82
|
+
export interface DefaultValue {
|
83
83
|
id: string;
|
84
84
|
type: string;
|
85
85
|
}
|
86
|
-
export interface
|
86
|
+
export interface TextInput {
|
87
87
|
type: ComponentTypes.TextInput;
|
88
88
|
customId: string;
|
89
89
|
style: TextInputStyles;
|
@@ -94,7 +94,7 @@ export interface JSONTextInput {
|
|
94
94
|
value?: string;
|
95
95
|
placeholder?: string;
|
96
96
|
}
|
97
|
-
export interface
|
97
|
+
export interface ActionRow {
|
98
98
|
type: ComponentTypes.ActionRow;
|
99
|
-
components: Array<
|
99
|
+
components: Array<Button | SelectMenu | TextInput>;
|
100
100
|
}
|
package/dist/lib/types/role.d.ts
CHANGED
@@ -23,7 +23,7 @@ export interface RawRoleTags {
|
|
23
23
|
available_for_purchase?: null;
|
24
24
|
guild_connections?: null;
|
25
25
|
}
|
26
|
-
export interface
|
26
|
+
export interface Role {
|
27
27
|
id: string;
|
28
28
|
name: string;
|
29
29
|
color: number;
|
@@ -34,10 +34,10 @@ export interface JSONRole {
|
|
34
34
|
permissions: string;
|
35
35
|
managed: boolean;
|
36
36
|
mentionable: boolean;
|
37
|
-
tags?:
|
37
|
+
tags?: RoleTags;
|
38
38
|
flags: RoleFlags;
|
39
39
|
}
|
40
|
-
export interface
|
40
|
+
export interface RoleTags {
|
41
41
|
botId?: string;
|
42
42
|
integrationId?: string;
|
43
43
|
premiumSubscriber?: null;
|
package/dist/lib/types/sku.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkuFlags, SkuTypes } from "../constants";
|
2
2
|
/** https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure */
|
3
|
-
export interface
|
3
|
+
export interface RawSku {
|
4
4
|
id: string;
|
5
|
-
type:
|
5
|
+
type: SkuTypes;
|
6
6
|
dependent_sku_id?: string | null;
|
7
7
|
application_id: string;
|
8
8
|
manifest_labels?: null;
|
@@ -11,13 +11,13 @@ export interface RawSKU {
|
|
11
11
|
features?: [];
|
12
12
|
release_date?: null;
|
13
13
|
slug: string;
|
14
|
-
flags:
|
14
|
+
flags: SkuFlags;
|
15
15
|
show_age_gate?: boolean;
|
16
16
|
}
|
17
|
-
export interface
|
17
|
+
export interface Sku {
|
18
18
|
id: string;
|
19
|
-
type:
|
20
|
-
|
19
|
+
type: SkuTypes;
|
20
|
+
dependentSkuId?: string | null;
|
21
21
|
applicationId: string;
|
22
22
|
manifestLabels?: null;
|
23
23
|
accessType?: number;
|
@@ -25,6 +25,6 @@ export interface JSONSKU {
|
|
25
25
|
features?: [];
|
26
26
|
releaseDate?: null;
|
27
27
|
slug: string;
|
28
|
-
flags:
|
28
|
+
flags: SkuFlags;
|
29
29
|
showAgeGate?: boolean;
|
30
30
|
}
|
@@ -9,7 +9,7 @@ export interface RawStageInstance {
|
|
9
9
|
discoverable_disabled: boolean;
|
10
10
|
guild_scheduled_event_id: string | null;
|
11
11
|
}
|
12
|
-
export interface
|
12
|
+
export interface StageInstance {
|
13
13
|
id: string;
|
14
14
|
guildId: string;
|
15
15
|
channelId: string;
|
@@ -18,3 +18,14 @@ export interface JSONStageInstance {
|
|
18
18
|
discoverableDisabled: boolean;
|
19
19
|
guildScheduledEventId: string | null;
|
20
20
|
}
|
21
|
+
export interface CreateStageInstanceParams {
|
22
|
+
channelId: string;
|
23
|
+
topic: string;
|
24
|
+
privacyLevel?: PrivacyLevel;
|
25
|
+
sendStartNotifications?: boolean;
|
26
|
+
guildScheduledEventId?: string;
|
27
|
+
}
|
28
|
+
export interface EditStageInstanceParams {
|
29
|
+
topic?: string;
|
30
|
+
privacyLevel?: PrivacyLevel;
|
31
|
+
}
|