disgroove 2.2.5-dev.4e978d8 → 2.2.5-dev.86e9686
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 +45 -4
- package/dist/lib/Client.js +142 -72
- package/dist/lib/constants.d.ts +30 -4
- package/dist/lib/constants.js +30 -3
- package/dist/lib/gateway/Shard.d.ts +3 -1
- package/dist/lib/gateway/Shard.js +28 -0
- package/dist/lib/rest/Endpoints.d.ts +4 -0
- package/dist/lib/rest/Endpoints.js +12 -3
- package/dist/lib/transformers/ApplicationCommands.js +2 -0
- package/dist/lib/transformers/Interactions.d.ts +3 -1
- package/dist/lib/transformers/Interactions.js +42 -0
- package/dist/lib/transformers/Soundboards.d.ts +5 -0
- package/dist/lib/transformers/Soundboards.js +31 -0
- package/dist/lib/transformers/index.d.ts +1 -0
- package/dist/lib/transformers/index.js +1 -0
- package/dist/lib/types/application-command.d.ts +3 -1
- package/dist/lib/types/gateway-events.d.ts +21 -0
- package/dist/lib/types/guild.d.ts +2 -0
- package/dist/lib/types/interaction.d.ts +44 -0
- package/dist/lib/types/soundboard.d.ts +23 -0
- package/dist/lib/types/soundboard.js +2 -0
- package/dist/lib/utils/CDN.d.ts +1 -0
- package/dist/lib/utils/CDN.js +3 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/Client.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
+
/// <reference types="node" />
|
2
3
|
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes } from "./constants";
|
3
4
|
import { RequestManager, type File } from "./rest";
|
4
5
|
import EventEmitter from "node:events";
|
@@ -12,11 +13,11 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
|
|
12
13
|
import type { LocaleMap, snowflake, timestamp } from "./types/common";
|
13
14
|
import type { Emoji } from "./types/emoji";
|
14
15
|
import type { Entitlement } from "./types/entitlements";
|
15
|
-
import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields } from "./types/gateway-events";
|
16
|
+
import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields, GuildSoundboardSoundDeleteEventFields } from "./types/gateway-events";
|
16
17
|
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
|
17
18
|
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
18
19
|
import type { GuildTemplate } from "./types/guild-template";
|
19
|
-
import type { Interaction, InteractionResponse } from "./types/interaction";
|
20
|
+
import type { Interaction, InteractionCallbackResponse, InteractionResponse } from "./types/interaction";
|
20
21
|
import type { Invite } from "./types/invite";
|
21
22
|
import type { ActionRow } from "./types/message-components";
|
22
23
|
import type { PollCreateParams } from "./types/poll";
|
@@ -29,7 +30,8 @@ import type { VoiceRegion, VoiceState } from "./types/voice";
|
|
29
30
|
import type { Webhook } from "./types/webhook";
|
30
31
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
31
32
|
import type { Embed, AllowedMentions, Attachment, Message, MessageReference } from "./types/message";
|
32
|
-
import { Subscription } from "./types/subscription";
|
33
|
+
import type { Subscription } from "./types/subscription";
|
34
|
+
import type { SoundboardSound } from "./types/soundboard";
|
33
35
|
export interface GatewayOptions {
|
34
36
|
properties?: IdentifyConnectionProperties;
|
35
37
|
compress?: boolean;
|
@@ -285,6 +287,14 @@ export declare class Client extends EventEmitter {
|
|
285
287
|
tags: string;
|
286
288
|
file: File;
|
287
289
|
}, reason?: string): Promise<Sticker>;
|
290
|
+
/** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
|
291
|
+
createGuildSoundboardSound(guildID: snowflake, options: {
|
292
|
+
name: string;
|
293
|
+
sound: Buffer;
|
294
|
+
volume?: number | null;
|
295
|
+
emojiID?: snowflake | null;
|
296
|
+
emojiName?: snowflake | null;
|
297
|
+
}, reason?: string): Promise<SoundboardSound>;
|
288
298
|
/** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
|
289
299
|
createGuildTemplate(guildID: snowflake, options: {
|
290
300
|
name: string;
|
@@ -305,7 +315,9 @@ export declare class Client extends EventEmitter {
|
|
305
315
|
poll?: PollCreateParams;
|
306
316
|
}): Promise<Message>;
|
307
317
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
|
308
|
-
createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse
|
318
|
+
createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse & {
|
319
|
+
withResponse?: boolean;
|
320
|
+
}): Promise<void | InteractionCallbackResponse>;
|
309
321
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
310
322
|
createMessage(channelID: snowflake, options: {
|
311
323
|
content?: string;
|
@@ -397,6 +409,8 @@ export declare class Client extends EventEmitter {
|
|
397
409
|
deleteGuildScheduledEvent(guildID: snowflake, guildScheduledEventID: snowflake): void;
|
398
410
|
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
399
411
|
deleteGuildSticker(guildID: snowflake, stickerID: snowflake, reason?: string): void;
|
412
|
+
/** https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */
|
413
|
+
deleteGuildSoundboardSound(guildID: snowflake, soundID: snowflake, reason?: string): void;
|
400
414
|
/** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
|
401
415
|
deleteGuildTemplate(guildID: snowflake, code: string): Promise<GuildTemplate>;
|
402
416
|
/** https://discord.com/developers/docs/resources/invite#delete-invite */
|
@@ -617,6 +631,13 @@ export declare class Client extends EventEmitter {
|
|
617
631
|
description?: string | null;
|
618
632
|
tags?: string;
|
619
633
|
}, reason?: string): Promise<Sticker>;
|
634
|
+
/** https://discord.com/developers/docs/resources/soundboard#edit-guild-soundboard-sound */
|
635
|
+
editGuildSoundboardSound(guildID: snowflake, soundID: snowflake, options: {
|
636
|
+
name?: string;
|
637
|
+
volume?: number | null;
|
638
|
+
emojiID?: snowflake | null;
|
639
|
+
emojiName?: snowflake | null;
|
640
|
+
}, reason?: string): Promise<SoundboardSound>;
|
620
641
|
/** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
|
621
642
|
editGuildTemplate(guildID: snowflake, code: string, options: {
|
622
643
|
name?: string;
|
@@ -786,6 +807,8 @@ export declare class Client extends EventEmitter {
|
|
786
807
|
getCurrentUserConnections(): Promise<Array<Connection>>;
|
787
808
|
/** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
|
788
809
|
getCurrentUserVoiceState(guildID: snowflake): Promise<VoiceState>;
|
810
|
+
/** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
|
811
|
+
getDefaultSoundboardSounds(): Promise<Array<SoundboardSound>>;
|
789
812
|
/** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
|
790
813
|
getEntitlements(applicationID: snowflake, options?: {
|
791
814
|
userID?: snowflake;
|
@@ -886,6 +909,11 @@ export declare class Client extends EventEmitter {
|
|
886
909
|
getGuildSticker(guildID: snowflake, stickerID: snowflake): Promise<Sticker>;
|
887
910
|
/** https://discord.com/developers/docs/resources/sticker#list-guild-stickers */
|
888
911
|
getGuildStickers(guildID: snowflake): Promise<Array<Sticker>>;
|
912
|
+
/** https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */
|
913
|
+
getGuildSoundboardSound(guildID: snowflake, soundID: snowflake): Promise<SoundboardSound>;
|
914
|
+
getGuildSoundboardSounds(guildID: snowflake): Promise<{
|
915
|
+
items: Array<SoundboardSound>;
|
916
|
+
}>;
|
889
917
|
/** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
|
890
918
|
getGuildTemplate(guildID: snowflake, code: string): Promise<GuildTemplate>;
|
891
919
|
/** https://discord.com/developers/docs/resources/guild-template#get-guild-templates */
|
@@ -1034,6 +1062,11 @@ export declare class Client extends EventEmitter {
|
|
1034
1062
|
query: string;
|
1035
1063
|
limit?: number;
|
1036
1064
|
}): Promise<Array<GuildMember>>;
|
1065
|
+
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
1066
|
+
sendSoundboardSound(channelID: snowflake, options: {
|
1067
|
+
soundID: snowflake;
|
1068
|
+
sourceGuildID?: snowflake;
|
1069
|
+
}): void;
|
1037
1070
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
1038
1071
|
setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
1039
1072
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
@@ -1130,6 +1163,14 @@ export interface ClientEvents {
|
|
1130
1163
|
guildScheduledEventID: snowflake,
|
1131
1164
|
guildID: snowflake
|
1132
1165
|
];
|
1166
|
+
guildSoundboardSoundCreate: [sound: SoundboardSound];
|
1167
|
+
guildSoundboardSoundUpdate: [sound: SoundboardSound];
|
1168
|
+
guildSoundboardSoundDelete: [sound: GuildSoundboardSoundDeleteEventFields];
|
1169
|
+
guildSoundboardSoundsUpdate: [
|
1170
|
+
sounds: Array<SoundboardSound>,
|
1171
|
+
guildID: snowflake
|
1172
|
+
];
|
1173
|
+
soundboardSounds: [sounds: Array<SoundboardSound>, guildID: snowflake];
|
1133
1174
|
integrationCreate: [
|
1134
1175
|
integration: Integration & IntegrationCreateEventExtraFields
|
1135
1176
|
];
|
package/dist/lib/Client.js
CHANGED
@@ -418,6 +418,20 @@ class Client extends node_events_1.default {
|
|
418
418
|
});
|
419
419
|
return transformers_1.Stickers.stickerFromRaw(response);
|
420
420
|
}
|
421
|
+
/** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
|
422
|
+
async createGuildSoundboardSound(guildID, options, reason) {
|
423
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID), {
|
424
|
+
json: {
|
425
|
+
name: options.name,
|
426
|
+
sound: options.sound,
|
427
|
+
volume: options.volume,
|
428
|
+
emoji_id: options.emojiID,
|
429
|
+
emoji_name: options.emojiName,
|
430
|
+
},
|
431
|
+
reason,
|
432
|
+
});
|
433
|
+
return transformers_1.Soundboards.soundboardSoundFromRaw(response);
|
434
|
+
}
|
421
435
|
/** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
|
422
436
|
async createGuildTemplate(guildID, options) {
|
423
437
|
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildTemplates(guildID), {
|
@@ -469,106 +483,118 @@ class Client extends node_events_1.default {
|
|
469
483
|
return transformers_1.Messages.messageFromRaw(response);
|
470
484
|
}
|
471
485
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
|
472
|
-
createInteractionResponse(interactionID, interactionToken, options) {
|
486
|
+
async createInteractionResponse(interactionID, interactionToken, options) {
|
487
|
+
let json;
|
488
|
+
let files;
|
473
489
|
switch (options.type) {
|
474
490
|
case constants_1.InteractionCallbackType.ChannelMessageWithSource:
|
475
491
|
case constants_1.InteractionCallbackType.UpdateMessage:
|
476
492
|
{
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
: undefined,
|
510
|
-
},
|
493
|
+
json = {
|
494
|
+
type: options.type,
|
495
|
+
data: {
|
496
|
+
content: options.data?.content,
|
497
|
+
embeds: options.data?.embeds !== undefined
|
498
|
+
? options.data.embeds.map((embed) => transformers_1.Messages.embedToRaw(embed))
|
499
|
+
: undefined,
|
500
|
+
allowed_mentions: options.data?.allowedMentions !== undefined
|
501
|
+
? {
|
502
|
+
parse: options.data.allowedMentions.parse,
|
503
|
+
roles: options.data.allowedMentions.roles,
|
504
|
+
users: options.data.allowedMentions.users,
|
505
|
+
replied_user: options.data.allowedMentions.repliedUser,
|
506
|
+
}
|
507
|
+
: undefined,
|
508
|
+
flags: options.data?.flags,
|
509
|
+
components: options.data?.components !== undefined
|
510
|
+
? transformers_1.Messages.componentsToRaw(options.data.components)
|
511
|
+
: undefined,
|
512
|
+
attachments: options.data?.attachments,
|
513
|
+
poll: options.data?.poll !== undefined
|
514
|
+
? {
|
515
|
+
question: options.data.poll.question,
|
516
|
+
answers: options.data.poll.answers.map((answer) => ({
|
517
|
+
answer_id: answer.answerID,
|
518
|
+
poll_media: answer.pollMedia,
|
519
|
+
})),
|
520
|
+
duration: options.data.poll.duration,
|
521
|
+
allow_multiselect: options.data.poll.allowMultiselect,
|
522
|
+
layout_type: options.data.poll.layoutType,
|
523
|
+
}
|
524
|
+
: undefined,
|
511
525
|
},
|
512
|
-
|
513
|
-
|
526
|
+
};
|
527
|
+
files = options.data?.files;
|
514
528
|
}
|
515
529
|
break;
|
516
530
|
case constants_1.InteractionCallbackType.DeferredChannelMessageWithSource:
|
517
531
|
case constants_1.InteractionCallbackType.DeferredUpdateMessage:
|
518
532
|
{
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
flags: options.data?.flags,
|
524
|
-
},
|
533
|
+
json = {
|
534
|
+
type: options.type,
|
535
|
+
data: {
|
536
|
+
flags: options.data?.flags,
|
525
537
|
},
|
526
|
-
}
|
538
|
+
};
|
527
539
|
}
|
528
540
|
break;
|
529
541
|
case constants_1.InteractionCallbackType.ApplicationCommandAutocompleteResult:
|
530
542
|
{
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
})),
|
540
|
-
},
|
543
|
+
json = {
|
544
|
+
type: options.type,
|
545
|
+
data: {
|
546
|
+
choices: options.data?.choices?.map((choice) => ({
|
547
|
+
name: choice.name,
|
548
|
+
name_localizations: choice.nameLocalizations,
|
549
|
+
value: choice.value,
|
550
|
+
})),
|
541
551
|
},
|
542
|
-
}
|
552
|
+
};
|
543
553
|
}
|
544
554
|
break;
|
545
555
|
case constants_1.InteractionCallbackType.Modal:
|
546
556
|
{
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
title: options.data?.title,
|
556
|
-
},
|
557
|
+
json = {
|
558
|
+
type: options.type,
|
559
|
+
data: {
|
560
|
+
custom_id: options.data?.customID,
|
561
|
+
components: options.data?.components !== undefined
|
562
|
+
? transformers_1.Messages.componentsToRaw(options.data.components)
|
563
|
+
: undefined,
|
564
|
+
title: options.data?.title,
|
557
565
|
},
|
558
|
-
}
|
566
|
+
};
|
559
567
|
}
|
560
568
|
break;
|
561
569
|
case constants_1.InteractionCallbackType.PremiumRequired:
|
570
|
+
case constants_1.InteractionCallbackType.LaunchActivity:
|
562
571
|
{
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
},
|
568
|
-
});
|
572
|
+
json = {
|
573
|
+
type: options.type,
|
574
|
+
data: {},
|
575
|
+
};
|
569
576
|
}
|
570
577
|
break;
|
571
578
|
}
|
579
|
+
if (options.withResponse) {
|
580
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
|
581
|
+
json,
|
582
|
+
query: {
|
583
|
+
with_response: options.withResponse,
|
584
|
+
},
|
585
|
+
files,
|
586
|
+
});
|
587
|
+
return transformers_1.Interactions.interactionCallbackResponseFromRaw(response);
|
588
|
+
}
|
589
|
+
else {
|
590
|
+
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
|
591
|
+
json,
|
592
|
+
query: {
|
593
|
+
with_response: options.withResponse,
|
594
|
+
},
|
595
|
+
files,
|
596
|
+
});
|
597
|
+
}
|
572
598
|
}
|
573
599
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
574
600
|
async createMessage(channelID, options) {
|
@@ -774,6 +800,12 @@ class Client extends node_events_1.default {
|
|
774
800
|
reason,
|
775
801
|
});
|
776
802
|
}
|
803
|
+
/** https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */
|
804
|
+
deleteGuildSoundboardSound(guildID, soundID, reason) {
|
805
|
+
this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
|
806
|
+
reason,
|
807
|
+
});
|
808
|
+
}
|
777
809
|
/** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
|
778
810
|
async deleteGuildTemplate(guildID, code) {
|
779
811
|
const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildTemplate(guildID, code));
|
@@ -1180,6 +1212,19 @@ class Client extends node_events_1.default {
|
|
1180
1212
|
});
|
1181
1213
|
return transformers_1.Stickers.stickerFromRaw(response);
|
1182
1214
|
}
|
1215
|
+
/** https://discord.com/developers/docs/resources/soundboard#edit-guild-soundboard-sound */
|
1216
|
+
async editGuildSoundboardSound(guildID, soundID, options, reason) {
|
1217
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
|
1218
|
+
json: {
|
1219
|
+
name: options.name,
|
1220
|
+
volume: options.volume,
|
1221
|
+
emoji_id: options.emojiID,
|
1222
|
+
emoji_name: options.emojiName,
|
1223
|
+
},
|
1224
|
+
reason,
|
1225
|
+
});
|
1226
|
+
return transformers_1.Soundboards.soundboardSoundFromRaw(response);
|
1227
|
+
}
|
1183
1228
|
/** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
|
1184
1229
|
async editGuildTemplate(guildID, code, options) {
|
1185
1230
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildTemplate(guildID, code), {
|
@@ -1707,6 +1752,11 @@ class Client extends node_events_1.default {
|
|
1707
1752
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
|
1708
1753
|
return transformers_1.Voice.voiceStateFromRaw(response);
|
1709
1754
|
}
|
1755
|
+
/** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
|
1756
|
+
async getDefaultSoundboardSounds() {
|
1757
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.soundboardDefaultSounds());
|
1758
|
+
return response.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound));
|
1759
|
+
}
|
1710
1760
|
/** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
|
1711
1761
|
async getEntitlements(applicationID, options) {
|
1712
1762
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
|
@@ -1960,6 +2010,17 @@ class Client extends node_events_1.default {
|
|
1960
2010
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildStickers(guildID));
|
1961
2011
|
return response.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker));
|
1962
2012
|
}
|
2013
|
+
/** https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */
|
2014
|
+
async getGuildSoundboardSound(guildID, soundID) {
|
2015
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID));
|
2016
|
+
return transformers_1.Soundboards.soundboardSoundFromRaw(response);
|
2017
|
+
}
|
2018
|
+
async getGuildSoundboardSounds(guildID) {
|
2019
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID));
|
2020
|
+
return {
|
2021
|
+
items: response.items.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound)),
|
2022
|
+
};
|
2023
|
+
}
|
1963
2024
|
/** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
|
1964
2025
|
async getGuildTemplate(guildID, code) {
|
1965
2026
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplate(guildID, code));
|
@@ -2313,6 +2374,15 @@ class Client extends node_events_1.default {
|
|
2313
2374
|
});
|
2314
2375
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
2315
2376
|
}
|
2377
|
+
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
2378
|
+
sendSoundboardSound(channelID, options) {
|
2379
|
+
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelID), {
|
2380
|
+
json: {
|
2381
|
+
sound_id: options.soundID,
|
2382
|
+
source_guild_id: options.sourceGuildID,
|
2383
|
+
},
|
2384
|
+
});
|
2385
|
+
}
|
2316
2386
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
2317
2387
|
setPresence(options) {
|
2318
2388
|
this.shards.forEach((shard) => shard.updatePresence(options));
|
package/dist/lib/constants.d.ts
CHANGED
@@ -63,7 +63,8 @@ export declare enum Locales {
|
|
63
63
|
export declare enum ApplicationCommandTypes {
|
64
64
|
ChatInput = 1,
|
65
65
|
User = 2,
|
66
|
-
Message = 3
|
66
|
+
Message = 3,
|
67
|
+
PrimaryEntryPoint = 4
|
67
68
|
}
|
68
69
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
|
69
70
|
export declare enum ApplicationCommandOptionType {
|
@@ -79,6 +80,11 @@ export declare enum ApplicationCommandOptionType {
|
|
79
80
|
Number = 10,
|
80
81
|
Attachment = 11
|
81
82
|
}
|
83
|
+
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types */
|
84
|
+
export declare enum EntryPointCommandHandlerTypes {
|
85
|
+
AppHandler = 1,
|
86
|
+
DiscordLaunchActivity = 2
|
87
|
+
}
|
82
88
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
|
83
89
|
export declare enum ApplicationCommandPermissionType {
|
84
90
|
Role = 1,
|
@@ -119,7 +125,8 @@ export declare enum InteractionCallbackType {
|
|
119
125
|
UpdateMessage = 7,
|
120
126
|
ApplicationCommandAutocompleteResult = 8,
|
121
127
|
Modal = 9,
|
122
|
-
PremiumRequired = 10
|
128
|
+
PremiumRequired = 10,
|
129
|
+
LaunchActivity = 12
|
123
130
|
}
|
124
131
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
125
132
|
export declare enum ButtonStyles {
|
@@ -219,6 +226,9 @@ export declare enum AuditLogEvents {
|
|
219
226
|
ThreadUpdate = 111,
|
220
227
|
ThreadDelete = 112,
|
221
228
|
ApplicationCommandPermissionUpdate = 121,
|
229
|
+
SoundboardSoundCreate = 130,
|
230
|
+
SoundboardSoundUpdate = 131,
|
231
|
+
SoundboardSoundDelete = 132,
|
222
232
|
AutoModerationRuleCreate = 140,
|
223
233
|
AutoModerationRuleUpdate = 141,
|
224
234
|
AutoModerationRuleDelete = 142,
|
@@ -362,6 +372,7 @@ export declare enum GuildFeatures {
|
|
362
372
|
InvitesDisabled = "INVITES_DISABLED",
|
363
373
|
InviteSplash = "INVITE_SPLASH",
|
364
374
|
MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
|
375
|
+
MoreSoundboard = "MORE_SOUNDBOARD",
|
365
376
|
MoreStickers = "MORE_STICKERS",
|
366
377
|
News = "NEWS",
|
367
378
|
Partnered = "PARTNERED",
|
@@ -370,6 +381,7 @@ export declare enum GuildFeatures {
|
|
370
381
|
RoleIcons = "ROLE_ICONS",
|
371
382
|
RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
|
372
383
|
RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
|
384
|
+
Soundboard = "SOUNDBOARD",
|
373
385
|
TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
|
374
386
|
VanityURL = "VANITY_URL",
|
375
387
|
Verified = "VERIFIED",
|
@@ -667,7 +679,7 @@ export declare enum GatewayIntents {
|
|
667
679
|
Guilds = 1,
|
668
680
|
GuildMembers = 2,
|
669
681
|
GuildModeration = 4,
|
670
|
-
|
682
|
+
GuildExpressions = 8,
|
671
683
|
GuildIntegrations = 16,
|
672
684
|
GuildWebhooks = 32,
|
673
685
|
GuildInvites = 64,
|
@@ -740,6 +752,11 @@ export declare enum GatewayEvents {
|
|
740
752
|
GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
|
741
753
|
GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
|
742
754
|
GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE",
|
755
|
+
GuildSoundboardSoundCreate = "GUILD_SOUNDBOARD_SOUND_CREATE",
|
756
|
+
GuildSoundboardSoundUpdate = "GUILD_SOUNDBOARD_SOUND_UPDATE",
|
757
|
+
GuildSoundboardSoundDelete = "GUILD_SOUNDBOARD_SOUND_DELETE",
|
758
|
+
GuildSoundboardSoundsUpdate = "GUILD_SOUNDBOARD_SOUNDS_UPDATE",
|
759
|
+
SoundboardSounds = "SOUNDBOARD_SOUNDS",
|
743
760
|
IntegrationCreate = "INTEGRATION_CREATE",
|
744
761
|
IntegrationUpdate = "INTEGRATION_UPDATE",
|
745
762
|
IntegrationDelete = "INTEGRATION_DELETE",
|
@@ -839,7 +856,8 @@ export declare enum GatewayOPCodes {
|
|
839
856
|
RequestGuildMembers = 8,
|
840
857
|
InvalidSession = 9,
|
841
858
|
Hello = 10,
|
842
|
-
HeartbeatACK = 11
|
859
|
+
HeartbeatACK = 11,
|
860
|
+
RequestSoundboardSounds = 31
|
843
861
|
}
|
844
862
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
845
863
|
export declare enum GatewayCloseEventCodes {
|
@@ -921,6 +939,7 @@ export declare enum JSONErrorCodes {
|
|
921
939
|
UnknownWebhook = 10015,
|
922
940
|
UnknownWebhookService = 10016,
|
923
941
|
UnknownSession = 10020,
|
942
|
+
UnknownAsset = 10021,
|
924
943
|
UnknownBan = 10026,
|
925
944
|
UnknownSKU = 10027,
|
926
945
|
UnknownStoreListing = 10028,
|
@@ -947,6 +966,7 @@ export declare enum JSONErrorCodes {
|
|
947
966
|
UnknownGuildScheduledEvent = 10070,
|
948
967
|
UnknownGuildScheduledEventUser = 10071,
|
949
968
|
UnknownTag = 10087,
|
969
|
+
UnknownSound = 10091,
|
950
970
|
BotsCannotUseThisEndpoint = 20001,
|
951
971
|
OnlyBotsCanUseThisEndpoint = 20002,
|
952
972
|
ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
|
@@ -985,6 +1005,7 @@ export declare enum JSONErrorCodes {
|
|
985
1005
|
MaximumNumberOfStickersReached = 30039,
|
986
1006
|
MaximumNumberOfPruneRequestsHasBeenReached = 30040,
|
987
1007
|
MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042,
|
1008
|
+
MaximumNumberOfSoundboardSoundsReached = 30045,
|
988
1009
|
MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
989
1010
|
MaximumNumberOfPinnedThreadsInForumHasBeenReached = 30047,
|
990
1011
|
MaximumNumberOfTagsInForumHasBeenReached = 30048,
|
@@ -1068,12 +1089,16 @@ export declare enum JSONErrorCodes {
|
|
1068
1089
|
ServerNeedsMonetizationEnabledToPerformThisAction = 50097,
|
1069
1090
|
ServerNeedsMoreBoostsToPerformThisAction = 50101,
|
1070
1091
|
RequestBodyContainsInvalidJSON = 50109,
|
1092
|
+
TheProvidedFileIsInvalid = 50110,
|
1093
|
+
TheProvidedFileTypeIsInvalid = 50123,
|
1094
|
+
TheProvidedFileDurationExceedsMaximumOf5Seconds = 50124,
|
1071
1095
|
OwnerCannotBePendingMember = 50131,
|
1072
1096
|
OwnershipCannotBeMovedToABotUser = 50132,
|
1073
1097
|
FailedToResizeAssetBelowTheMinimumSize = 50138,
|
1074
1098
|
CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50144,
|
1075
1099
|
CannotConvertBetweenPremiumEmojiAndNormalEmoji = 50145,
|
1076
1100
|
UploadedFileNotFound = 50146,
|
1101
|
+
TheSpecifiedEmojiIsInvalid = 50151,
|
1077
1102
|
VoiceMessagesDoNotSupportAdditionalContent = 50159,
|
1078
1103
|
VoiceMessagesMustHaveASingleAudioAttachment = 50160,
|
1079
1104
|
VoiceMessagesMustHaveSupportingMetadata = 50161,
|
@@ -1081,6 +1106,7 @@ export declare enum JSONErrorCodes {
|
|
1081
1106
|
CannotDeleteGuildSubscriptionIntegration = 50163,
|
1082
1107
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
1083
1108
|
TheUserAccountMustFirstBeVerified = 50178,
|
1109
|
+
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
1084
1110
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
1085
1111
|
TwoFactorAuthenticationIsRequired = 60003,
|
1086
1112
|
NoUsersWithDiscordTagExist = 80004,
|
package/dist/lib/constants.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = void 0;
|
3
|
+
exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
4
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = void 0;
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
6
6
|
var TimestampStyles;
|
7
7
|
(function (TimestampStyles) {
|
@@ -73,6 +73,7 @@ var ApplicationCommandTypes;
|
|
73
73
|
ApplicationCommandTypes[ApplicationCommandTypes["ChatInput"] = 1] = "ChatInput";
|
74
74
|
ApplicationCommandTypes[ApplicationCommandTypes["User"] = 2] = "User";
|
75
75
|
ApplicationCommandTypes[ApplicationCommandTypes["Message"] = 3] = "Message";
|
76
|
+
ApplicationCommandTypes[ApplicationCommandTypes["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
|
76
77
|
})(ApplicationCommandTypes || (exports.ApplicationCommandTypes = ApplicationCommandTypes = {}));
|
77
78
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
|
78
79
|
var ApplicationCommandOptionType;
|
@@ -89,6 +90,12 @@ var ApplicationCommandOptionType;
|
|
89
90
|
ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
|
90
91
|
ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
|
91
92
|
})(ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = ApplicationCommandOptionType = {}));
|
93
|
+
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types */
|
94
|
+
var EntryPointCommandHandlerTypes;
|
95
|
+
(function (EntryPointCommandHandlerTypes) {
|
96
|
+
EntryPointCommandHandlerTypes[EntryPointCommandHandlerTypes["AppHandler"] = 1] = "AppHandler";
|
97
|
+
EntryPointCommandHandlerTypes[EntryPointCommandHandlerTypes["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity";
|
98
|
+
})(EntryPointCommandHandlerTypes || (exports.EntryPointCommandHandlerTypes = EntryPointCommandHandlerTypes = {}));
|
92
99
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
|
93
100
|
var ApplicationCommandPermissionType;
|
94
101
|
(function (ApplicationCommandPermissionType) {
|
@@ -135,6 +142,7 @@ var InteractionCallbackType;
|
|
135
142
|
InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
|
136
143
|
InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
|
137
144
|
InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
|
145
|
+
InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
|
138
146
|
})(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
|
139
147
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
140
148
|
var ButtonStyles;
|
@@ -241,6 +249,9 @@ var AuditLogEvents;
|
|
241
249
|
AuditLogEvents[AuditLogEvents["ThreadUpdate"] = 111] = "ThreadUpdate";
|
242
250
|
AuditLogEvents[AuditLogEvents["ThreadDelete"] = 112] = "ThreadDelete";
|
243
251
|
AuditLogEvents[AuditLogEvents["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate";
|
252
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundCreate"] = 130] = "SoundboardSoundCreate";
|
253
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundUpdate"] = 131] = "SoundboardSoundUpdate";
|
254
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundDelete"] = 132] = "SoundboardSoundDelete";
|
244
255
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate";
|
245
256
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate";
|
246
257
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete";
|
@@ -401,6 +412,7 @@ var GuildFeatures;
|
|
401
412
|
GuildFeatures["InvitesDisabled"] = "INVITES_DISABLED";
|
402
413
|
GuildFeatures["InviteSplash"] = "INVITE_SPLASH";
|
403
414
|
GuildFeatures["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
|
415
|
+
GuildFeatures["MoreSoundboard"] = "MORE_SOUNDBOARD";
|
404
416
|
GuildFeatures["MoreStickers"] = "MORE_STICKERS";
|
405
417
|
GuildFeatures["News"] = "NEWS";
|
406
418
|
GuildFeatures["Partnered"] = "PARTNERED";
|
@@ -409,6 +421,7 @@ var GuildFeatures;
|
|
409
421
|
GuildFeatures["RoleIcons"] = "ROLE_ICONS";
|
410
422
|
GuildFeatures["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE";
|
411
423
|
GuildFeatures["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
|
424
|
+
GuildFeatures["Soundboard"] = "SOUNDBOARD";
|
412
425
|
GuildFeatures["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED";
|
413
426
|
GuildFeatures["VanityURL"] = "VANITY_URL";
|
414
427
|
GuildFeatures["Verified"] = "VERIFIED";
|
@@ -740,7 +753,7 @@ var GatewayIntents;
|
|
740
753
|
GatewayIntents[GatewayIntents["Guilds"] = 1] = "Guilds";
|
741
754
|
GatewayIntents[GatewayIntents["GuildMembers"] = 2] = "GuildMembers";
|
742
755
|
GatewayIntents[GatewayIntents["GuildModeration"] = 4] = "GuildModeration";
|
743
|
-
GatewayIntents[GatewayIntents["
|
756
|
+
GatewayIntents[GatewayIntents["GuildExpressions"] = 8] = "GuildExpressions";
|
744
757
|
GatewayIntents[GatewayIntents["GuildIntegrations"] = 16] = "GuildIntegrations";
|
745
758
|
GatewayIntents[GatewayIntents["GuildWebhooks"] = 32] = "GuildWebhooks";
|
746
759
|
GatewayIntents[GatewayIntents["GuildInvites"] = 64] = "GuildInvites";
|
@@ -815,6 +828,11 @@ var GatewayEvents;
|
|
815
828
|
GatewayEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
|
816
829
|
GatewayEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
|
817
830
|
GatewayEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
|
831
|
+
GatewayEvents["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE";
|
832
|
+
GatewayEvents["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE";
|
833
|
+
GatewayEvents["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE";
|
834
|
+
GatewayEvents["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE";
|
835
|
+
GatewayEvents["SoundboardSounds"] = "SOUNDBOARD_SOUNDS";
|
818
836
|
GatewayEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
|
819
837
|
GatewayEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
|
820
838
|
GatewayEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
|
@@ -920,6 +938,7 @@ var GatewayOPCodes;
|
|
920
938
|
GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession";
|
921
939
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
922
940
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
941
|
+
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
923
942
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
924
943
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
925
944
|
var GatewayCloseEventCodes;
|
@@ -1006,6 +1025,7 @@ var JSONErrorCodes;
|
|
1006
1025
|
JSONErrorCodes[JSONErrorCodes["UnknownWebhook"] = 10015] = "UnknownWebhook";
|
1007
1026
|
JSONErrorCodes[JSONErrorCodes["UnknownWebhookService"] = 10016] = "UnknownWebhookService";
|
1008
1027
|
JSONErrorCodes[JSONErrorCodes["UnknownSession"] = 10020] = "UnknownSession";
|
1028
|
+
JSONErrorCodes[JSONErrorCodes["UnknownAsset"] = 10021] = "UnknownAsset";
|
1009
1029
|
JSONErrorCodes[JSONErrorCodes["UnknownBan"] = 10026] = "UnknownBan";
|
1010
1030
|
JSONErrorCodes[JSONErrorCodes["UnknownSKU"] = 10027] = "UnknownSKU";
|
1011
1031
|
JSONErrorCodes[JSONErrorCodes["UnknownStoreListing"] = 10028] = "UnknownStoreListing";
|
@@ -1032,6 +1052,7 @@ var JSONErrorCodes;
|
|
1032
1052
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildScheduledEvent"] = 10070] = "UnknownGuildScheduledEvent";
|
1033
1053
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildScheduledEventUser"] = 10071] = "UnknownGuildScheduledEventUser";
|
1034
1054
|
JSONErrorCodes[JSONErrorCodes["UnknownTag"] = 10087] = "UnknownTag";
|
1055
|
+
JSONErrorCodes[JSONErrorCodes["UnknownSound"] = 10091] = "UnknownSound";
|
1035
1056
|
JSONErrorCodes[JSONErrorCodes["BotsCannotUseThisEndpoint"] = 20001] = "BotsCannotUseThisEndpoint";
|
1036
1057
|
JSONErrorCodes[JSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
|
1037
1058
|
JSONErrorCodes[JSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
|
@@ -1070,6 +1091,7 @@ var JSONErrorCodes;
|
|
1070
1091
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfStickersReached"] = 30039] = "MaximumNumberOfStickersReached";
|
1071
1092
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfPruneRequestsHasBeenReached"] = 30040] = "MaximumNumberOfPruneRequestsHasBeenReached";
|
1072
1093
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached"] = 30042] = "MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached";
|
1094
|
+
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfSoundboardSoundsReached"] = 30045] = "MaximumNumberOfSoundboardSoundsReached";
|
1073
1095
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfEditsToMessagesOlderThanOneHourReached"] = 30046] = "MaximumNumberOfEditsToMessagesOlderThanOneHourReached";
|
1074
1096
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfPinnedThreadsInForumHasBeenReached"] = 30047] = "MaximumNumberOfPinnedThreadsInForumHasBeenReached";
|
1075
1097
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfTagsInForumHasBeenReached"] = 30048] = "MaximumNumberOfTagsInForumHasBeenReached";
|
@@ -1153,12 +1175,16 @@ var JSONErrorCodes;
|
|
1153
1175
|
JSONErrorCodes[JSONErrorCodes["ServerNeedsMonetizationEnabledToPerformThisAction"] = 50097] = "ServerNeedsMonetizationEnabledToPerformThisAction";
|
1154
1176
|
JSONErrorCodes[JSONErrorCodes["ServerNeedsMoreBoostsToPerformThisAction"] = 50101] = "ServerNeedsMoreBoostsToPerformThisAction";
|
1155
1177
|
JSONErrorCodes[JSONErrorCodes["RequestBodyContainsInvalidJSON"] = 50109] = "RequestBodyContainsInvalidJSON";
|
1178
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileIsInvalid"] = 50110] = "TheProvidedFileIsInvalid";
|
1179
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileTypeIsInvalid"] = 50123] = "TheProvidedFileTypeIsInvalid";
|
1180
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDurationExceedsMaximumOf5Seconds"] = 50124] = "TheProvidedFileDurationExceedsMaximumOf5Seconds";
|
1156
1181
|
JSONErrorCodes[JSONErrorCodes["OwnerCannotBePendingMember"] = 50131] = "OwnerCannotBePendingMember";
|
1157
1182
|
JSONErrorCodes[JSONErrorCodes["OwnershipCannotBeMovedToABotUser"] = 50132] = "OwnershipCannotBeMovedToABotUser";
|
1158
1183
|
JSONErrorCodes[JSONErrorCodes["FailedToResizeAssetBelowTheMinimumSize"] = 50138] = "FailedToResizeAssetBelowTheMinimumSize";
|
1159
1184
|
JSONErrorCodes[JSONErrorCodes["CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"] = 50144] = "CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji";
|
1160
1185
|
JSONErrorCodes[JSONErrorCodes["CannotConvertBetweenPremiumEmojiAndNormalEmoji"] = 50145] = "CannotConvertBetweenPremiumEmojiAndNormalEmoji";
|
1161
1186
|
JSONErrorCodes[JSONErrorCodes["UploadedFileNotFound"] = 50146] = "UploadedFileNotFound";
|
1187
|
+
JSONErrorCodes[JSONErrorCodes["TheSpecifiedEmojiIsInvalid"] = 50151] = "TheSpecifiedEmojiIsInvalid";
|
1162
1188
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesDoNotSupportAdditionalContent"] = 50159] = "VoiceMessagesDoNotSupportAdditionalContent";
|
1163
1189
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveASingleAudioAttachment"] = 50160] = "VoiceMessagesMustHaveASingleAudioAttachment";
|
1164
1190
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
|
@@ -1166,6 +1192,7 @@ var JSONErrorCodes;
|
|
1166
1192
|
JSONErrorCodes[JSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
|
1167
1193
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
1168
1194
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
1195
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
1169
1196
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
1170
1197
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
1171
1198
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import WebSocket from "ws";
|
2
2
|
import { Client } from "../Client";
|
3
|
-
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, Resume } from "../types/gateway-events";
|
3
|
+
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
4
4
|
export declare class Shard {
|
5
5
|
id: number;
|
6
6
|
private heartbeatInterval;
|
@@ -24,6 +24,8 @@ export declare class Shard {
|
|
24
24
|
private onWebSocketClose;
|
25
25
|
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
26
26
|
requestGuildMembers(options: RequestGuildMembers): void;
|
27
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
28
|
+
requestSoundboardSounds(options: RequestSoundboardSounds): void;
|
27
29
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
28
30
|
resume(options: Resume): void;
|
29
31
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
@@ -268,6 +268,7 @@ class Shard {
|
|
268
268
|
user: transformers_1.Users.userFromRaw(packet.d.user),
|
269
269
|
nick: packet.d.nick,
|
270
270
|
avatar: packet.d.avatar,
|
271
|
+
banner: packet.d.banner,
|
271
272
|
joinedAt: packet.d.joined_at,
|
272
273
|
premiumSince: packet.d.premium_since,
|
273
274
|
deaf: packet.d.deaf,
|
@@ -318,6 +319,24 @@ class Shard {
|
|
318
319
|
case constants_1.GatewayEvents.GuildScheduledEventUserRemove:
|
319
320
|
this.client.emit("guildScheduledEventUserRemove", packet.d.user_id, packet.d.guild_scheduled_event_id, packet.d.guild_id);
|
320
321
|
break;
|
322
|
+
case constants_1.GatewayEvents.GuildSoundboardSoundCreate:
|
323
|
+
this.client.emit("guildSoundboardSoundCreate", transformers_1.Soundboards.soundboardSoundFromRaw(packet.d));
|
324
|
+
break;
|
325
|
+
case constants_1.GatewayEvents.GuildSoundboardSoundUpdate:
|
326
|
+
this.client.emit("guildSoundboardSoundUpdate", transformers_1.Soundboards.soundboardSoundFromRaw(packet.d));
|
327
|
+
break;
|
328
|
+
case constants_1.GatewayEvents.GuildSoundboardSoundDelete:
|
329
|
+
this.client.emit("guildSoundboardSoundDelete", {
|
330
|
+
soundID: packet.d.sound_id,
|
331
|
+
guildID: packet.d.guild_id,
|
332
|
+
});
|
333
|
+
break;
|
334
|
+
case constants_1.GatewayEvents.GuildSoundboardSoundsUpdate:
|
335
|
+
this.client.emit("guildSoundboardSoundsUpdate", packet.d.soundboard_sounds.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound)), packet.d.guild_id);
|
336
|
+
break;
|
337
|
+
case constants_1.GatewayEvents.SoundboardSounds:
|
338
|
+
this.client.emit("soundboardSounds", packet.d.soundboard_sounds.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound)), packet.d.guild_id);
|
339
|
+
break;
|
321
340
|
case constants_1.GatewayEvents.IntegrationCreate:
|
322
341
|
this.client.emit("integrationCreate", {
|
323
342
|
...transformers_1.Guilds.integrationFromRaw(packet.d),
|
@@ -598,6 +617,15 @@ class Shard {
|
|
598
617
|
},
|
599
618
|
}));
|
600
619
|
}
|
620
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
621
|
+
requestSoundboardSounds(options) {
|
622
|
+
this.ws.send(JSON.stringify({
|
623
|
+
op: constants_1.GatewayOPCodes.RequestSoundboardSounds,
|
624
|
+
d: {
|
625
|
+
guild_ids: options.guildIDs,
|
626
|
+
},
|
627
|
+
}));
|
628
|
+
}
|
601
629
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
602
630
|
resume(options) {
|
603
631
|
this.ws.send(JSON.stringify({
|
@@ -29,6 +29,8 @@ export declare const guildRoles: (guildID: snowflake) => `guilds/${string}/roles
|
|
29
29
|
export declare const guildScheduledEvent: (guildID: snowflake, guildScheduledEventID: snowflake) => `guilds/${string}/scheduled-events/${string}`;
|
30
30
|
export declare const guildScheduledEvents: (guildID: snowflake) => `guilds/${string}/scheduled-events`;
|
31
31
|
export declare const guildScheduledEventUsers: (guildID: snowflake, guildScheduledEventID: snowflake) => `guilds/${string}/scheduled-events/${string}/users`;
|
32
|
+
export declare const guildSoundboardSound: (guildID: snowflake, soundID: snowflake) => `guilds/${string}/soundboard-sounds/${string}`;
|
33
|
+
export declare const guildSoundboardSounds: (guildID: snowflake) => `guilds/${string}/soundboard-sounds`;
|
32
34
|
export declare const guildSticker: (guildID: snowflake, stickerID: snowflake) => `guilds/${string}/stickers/${string}`;
|
33
35
|
export declare const guildStickers: (guildID: snowflake) => `guilds/${string}/stickers`;
|
34
36
|
export declare const guildTemplate: (guildID: snowflake, code: string) => `guilds/${string}/templates/${string}`;
|
@@ -90,6 +92,8 @@ export declare const stickerPack: (packID: snowflake) => `sticker-packs/${string
|
|
90
92
|
export declare const stickerPacks: () => "sticker-packs";
|
91
93
|
export declare const skuSubscription: (skuID: snowflake, subscriptionID: snowflake) => `skus/${string}/subscriptions/${string}`;
|
92
94
|
export declare const skuSubscriptions: (skuID: snowflake) => `skus/${string}/subscriptions`;
|
95
|
+
export declare const sendSoundboardSound: (channelID: snowflake) => `channels/${string}/send-soundboard-sound`;
|
96
|
+
export declare const soundboardDefaultSounds: () => "soundboard-default-sounds";
|
93
97
|
export declare const gateway: () => "gateway";
|
94
98
|
export declare const gatewayBot: () => "gateway/bot";
|
95
99
|
export declare const oauth2Authorize: () => "oauth2/authorize";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.
|
5
|
-
exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = void 0;
|
3
|
+
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.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
4
|
+
exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = void 0;
|
5
|
+
exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = void 0;
|
6
6
|
// Guilds
|
7
7
|
const guild = (guildID) => `guilds/${guildID}`;
|
8
8
|
exports.guild = guild;
|
@@ -64,6 +64,10 @@ const guildScheduledEvents = (guildID) => `guilds/${guildID}/scheduled-events`;
|
|
64
64
|
exports.guildScheduledEvents = guildScheduledEvents;
|
65
65
|
const guildScheduledEventUsers = (guildID, guildScheduledEventID) => `guilds/${guildID}/scheduled-events/${guildScheduledEventID}/users`;
|
66
66
|
exports.guildScheduledEventUsers = guildScheduledEventUsers;
|
67
|
+
const guildSoundboardSound = (guildID, soundID) => `guilds/${guildID}/soundboard-sounds/${soundID}`;
|
68
|
+
exports.guildSoundboardSound = guildSoundboardSound;
|
69
|
+
const guildSoundboardSounds = (guildID) => `guilds/${guildID}/soundboard-sounds`;
|
70
|
+
exports.guildSoundboardSounds = guildSoundboardSounds;
|
67
71
|
const guildSticker = (guildID, stickerID) => `guilds/${guildID}/stickers/${stickerID}`;
|
68
72
|
exports.guildSticker = guildSticker;
|
69
73
|
const guildStickers = (guildID) => `guilds/${guildID}/stickers`;
|
@@ -202,6 +206,11 @@ const skuSubscription = (skuID, subscriptionID) => `skus/${skuID}/subscriptions/
|
|
202
206
|
exports.skuSubscription = skuSubscription;
|
203
207
|
const skuSubscriptions = (skuID) => `skus/${skuID}/subscriptions`;
|
204
208
|
exports.skuSubscriptions = skuSubscriptions;
|
209
|
+
// Soundboards
|
210
|
+
const sendSoundboardSound = (channelID) => `channels/${channelID}/send-soundboard-sound`;
|
211
|
+
exports.sendSoundboardSound = sendSoundboardSound;
|
212
|
+
const soundboardDefaultSounds = () => `soundboard-default-sounds`;
|
213
|
+
exports.soundboardDefaultSounds = soundboardDefaultSounds;
|
205
214
|
// Gateway
|
206
215
|
const gateway = () => "gateway";
|
207
216
|
exports.gateway = gateway;
|
@@ -20,6 +20,7 @@ class ApplicationCommands {
|
|
20
20
|
contexts: command.contexts,
|
21
21
|
nsfw: command.nsfw,
|
22
22
|
version: command.version,
|
23
|
+
handler: command.handler,
|
23
24
|
};
|
24
25
|
}
|
25
26
|
static applicationCommandToRaw(command) {
|
@@ -40,6 +41,7 @@ class ApplicationCommands {
|
|
40
41
|
contexts: command.contexts,
|
41
42
|
nsfw: command.nsfw,
|
42
43
|
version: command.version,
|
44
|
+
handler: command.handler,
|
43
45
|
};
|
44
46
|
}
|
45
47
|
static optionToRaw(option) {
|
@@ -1,6 +1,8 @@
|
|
1
|
-
import type { RawInteraction, Interaction, RawResolvedData, ResolvedData } from "../types/interaction";
|
1
|
+
import type { RawInteraction, Interaction, RawResolvedData, ResolvedData, RawInteractionCallbackResponse, InteractionCallbackResponse } from "../types/interaction";
|
2
2
|
import type { RawMessageInteractionMetadata, MessageInteractionMetadata } from "../types/message";
|
3
3
|
export declare class Interactions {
|
4
|
+
static interactionCallbackResponseFromRaw(interactionCallbackResponse: RawInteractionCallbackResponse): InteractionCallbackResponse;
|
5
|
+
static interactionCallbackResponseToRaw(interactionCallbackResponse: InteractionCallbackResponse): RawInteractionCallbackResponse;
|
4
6
|
static interactionFromRaw(interaction: RawInteraction): Interaction;
|
5
7
|
static interactionMetadataFromRaw(interactionMetadata: RawMessageInteractionMetadata): MessageInteractionMetadata;
|
6
8
|
static interactionMetadataToRaw(interactionMetadata: MessageInteractionMetadata): RawMessageInteractionMetadata;
|
@@ -8,6 +8,48 @@ const Entitlements_1 = require("./Entitlements");
|
|
8
8
|
const Roles_1 = require("./Roles");
|
9
9
|
const Messages_1 = require("./Messages");
|
10
10
|
class Interactions {
|
11
|
+
static interactionCallbackResponseFromRaw(interactionCallbackResponse) {
|
12
|
+
return {
|
13
|
+
interaction: {
|
14
|
+
id: interactionCallbackResponse.interaction.id,
|
15
|
+
type: interactionCallbackResponse.interaction.type,
|
16
|
+
activityInstanceID: interactionCallbackResponse.interaction.activity_instance_id,
|
17
|
+
responseMessageID: interactionCallbackResponse.interaction.response_message_id,
|
18
|
+
responseMessageLoading: interactionCallbackResponse.interaction.response_message_loading,
|
19
|
+
responseMessageEphemeral: interactionCallbackResponse.interaction.response_message_ephemeral,
|
20
|
+
},
|
21
|
+
resource: interactionCallbackResponse.resource !== undefined
|
22
|
+
? {
|
23
|
+
type: interactionCallbackResponse.resource.type,
|
24
|
+
activityInstance: interactionCallbackResponse.resource.activity_instance,
|
25
|
+
message: interactionCallbackResponse.resource.message !== undefined
|
26
|
+
? Messages_1.Messages.messageFromRaw(interactionCallbackResponse.resource.message)
|
27
|
+
: undefined,
|
28
|
+
}
|
29
|
+
: undefined,
|
30
|
+
};
|
31
|
+
}
|
32
|
+
static interactionCallbackResponseToRaw(interactionCallbackResponse) {
|
33
|
+
return {
|
34
|
+
interaction: {
|
35
|
+
id: interactionCallbackResponse.interaction.id,
|
36
|
+
type: interactionCallbackResponse.interaction.type,
|
37
|
+
activity_instance_id: interactionCallbackResponse.interaction.activityInstanceID,
|
38
|
+
response_message_id: interactionCallbackResponse.interaction.responseMessageID,
|
39
|
+
response_message_loading: interactionCallbackResponse.interaction.responseMessageLoading,
|
40
|
+
response_message_ephemeral: interactionCallbackResponse.interaction.responseMessageEphemeral,
|
41
|
+
},
|
42
|
+
resource: interactionCallbackResponse.resource !== undefined
|
43
|
+
? {
|
44
|
+
type: interactionCallbackResponse.resource.type,
|
45
|
+
activity_instance: interactionCallbackResponse.resource.activityInstance,
|
46
|
+
message: interactionCallbackResponse.resource.message !== undefined
|
47
|
+
? Messages_1.Messages.messageToRaw(interactionCallbackResponse.resource.message)
|
48
|
+
: undefined,
|
49
|
+
}
|
50
|
+
: undefined,
|
51
|
+
};
|
52
|
+
}
|
11
53
|
static interactionFromRaw(interaction) {
|
12
54
|
return {
|
13
55
|
id: interaction.id,
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { RawSoundboardSound, SoundboardSound } from "../types/soundboard";
|
2
|
+
export declare class Soundboards {
|
3
|
+
static soundboardSoundFromRaw(sound: RawSoundboardSound): SoundboardSound;
|
4
|
+
static soundboardSoundToRaw(sound: SoundboardSound): RawSoundboardSound;
|
5
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Soundboards = void 0;
|
4
|
+
const Users_1 = require("./Users");
|
5
|
+
class Soundboards {
|
6
|
+
static soundboardSoundFromRaw(sound) {
|
7
|
+
return {
|
8
|
+
name: sound.name,
|
9
|
+
soundID: sound.sound_id,
|
10
|
+
volume: sound.volume,
|
11
|
+
emojiID: sound.emoji_id,
|
12
|
+
emojiName: sound.emoji_name,
|
13
|
+
guildID: sound.guild_id,
|
14
|
+
available: sound.available,
|
15
|
+
user: sound.user !== undefined ? Users_1.Users.userFromRaw(sound.user) : undefined,
|
16
|
+
};
|
17
|
+
}
|
18
|
+
static soundboardSoundToRaw(sound) {
|
19
|
+
return {
|
20
|
+
name: sound.name,
|
21
|
+
sound_id: sound.soundID,
|
22
|
+
volume: sound.volume,
|
23
|
+
emoji_id: sound.emojiID,
|
24
|
+
emoji_name: sound.emojiName,
|
25
|
+
guild_id: sound.guildID,
|
26
|
+
available: sound.available,
|
27
|
+
user: sound.user !== undefined ? Users_1.Users.userToRaw(sound.user) : undefined,
|
28
|
+
};
|
29
|
+
}
|
30
|
+
}
|
31
|
+
exports.Soundboards = Soundboards;
|
@@ -32,6 +32,7 @@ __exportStar(require("./Polls"), exports);
|
|
32
32
|
__exportStar(require("./Presences"), exports);
|
33
33
|
__exportStar(require("./Roles"), exports);
|
34
34
|
__exportStar(require("./SKUs"), exports);
|
35
|
+
__exportStar(require("./Soundboards"), exports);
|
35
36
|
__exportStar(require("./StageInstances"), exports);
|
36
37
|
__exportStar(require("./Stickers"), exports);
|
37
38
|
__exportStar(require("./Subscriptions"), exports);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType, ApplicationIntegrationTypes, InteractionContextTypes } from "../constants";
|
1
|
+
import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType, ApplicationIntegrationTypes, InteractionContextTypes, EntryPointCommandHandlerTypes } from "../constants";
|
2
2
|
import type { snowflake, LocaleMap } from "./common";
|
3
3
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure */
|
4
4
|
export interface RawApplicationCommand {
|
@@ -18,6 +18,7 @@ export interface RawApplicationCommand {
|
|
18
18
|
contexts?: Array<InteractionContextTypes>;
|
19
19
|
nsfw?: boolean;
|
20
20
|
version: snowflake;
|
21
|
+
handler?: EntryPointCommandHandlerTypes;
|
21
22
|
}
|
22
23
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure */
|
23
24
|
export interface RawApplicationCommandOption {
|
@@ -72,6 +73,7 @@ export interface ApplicationCommand {
|
|
72
73
|
contexts?: Array<InteractionContextTypes>;
|
73
74
|
nsfw?: boolean;
|
74
75
|
version: string;
|
76
|
+
handler?: EntryPointCommandHandlerTypes;
|
75
77
|
}
|
76
78
|
export interface ApplicationCommandOption {
|
77
79
|
type: ApplicationCommandOptionType;
|
@@ -6,6 +6,7 @@ import type { snowflake, timestamp } from "./common";
|
|
6
6
|
import type { RawEmoji, Emoji } from "./emoji";
|
7
7
|
import type { RawGuildMember, GuildMember } from "./guild";
|
8
8
|
import type { RawGuildScheduledEvent, GuildScheduledEvent } from "./guild-scheduled-event";
|
9
|
+
import type { RawSoundboardSound, SoundboardSound } from "./soundboard";
|
9
10
|
import type { RawStageInstance, StageInstance } from "./stage-instance";
|
10
11
|
import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData } from "./user";
|
11
12
|
import type { RawVoiceState, VoiceState } from "./voice";
|
@@ -47,6 +48,10 @@ export interface RawRequestGuildMembers {
|
|
47
48
|
user_ids?: snowflake | Array<snowflake>;
|
48
49
|
nonce?: string;
|
49
50
|
}
|
51
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds-request-soundboard-sounds-structure */
|
52
|
+
export interface RequestSoundboardSounds {
|
53
|
+
guild_ids: Array<snowflake>;
|
54
|
+
}
|
50
55
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure */
|
51
56
|
export interface RawGatewayPresenceUpdate {
|
52
57
|
since: number | null;
|
@@ -113,6 +118,7 @@ export interface RawGuildCreateEventExtraFields {
|
|
113
118
|
presences?: Array<RawPresenceUpdateEventFields>;
|
114
119
|
stage_instances?: Array<RawStageInstance>;
|
115
120
|
guild_scheduled_events?: Array<RawGuildScheduledEvent>;
|
121
|
+
soundboard_sounds?: Array<RawSoundboardSound>;
|
116
122
|
}
|
117
123
|
/** https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create-guild-audit-log-entry-create-extra-fields */
|
118
124
|
export interface RawGuildAuditLogEntryCreateExtraFields {
|
@@ -148,6 +154,7 @@ export interface RawGuildMemberUpdateEventFields {
|
|
148
154
|
user: RawUser;
|
149
155
|
nick?: string | null;
|
150
156
|
avatar: string | null;
|
157
|
+
banner: string | null;
|
151
158
|
joined_at?: timestamp | null;
|
152
159
|
premium_since?: number | null;
|
153
160
|
deaf?: boolean;
|
@@ -167,6 +174,11 @@ export interface RawGuildMembersChunkEventFields {
|
|
167
174
|
presences?: Array<RawPresenceUpdateEventFields>;
|
168
175
|
nonce?: string;
|
169
176
|
}
|
177
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-soundboard-sound-delete-guild-soundboard-sound-delete-event-fields */
|
178
|
+
export interface RawGuildSoundboardSoundDeleteEventFields {
|
179
|
+
soundID: snowflake;
|
180
|
+
guildID: snowflake;
|
181
|
+
}
|
170
182
|
/** https://discord.com/developers/docs/topics/gateway-events#integration-create-integration-create-event-additional-fields */
|
171
183
|
export interface RawIntegrationCreateEventExtraFields {
|
172
184
|
guild_id: snowflake;
|
@@ -396,6 +408,9 @@ export interface RequestGuildMembers {
|
|
396
408
|
userIDs?: snowflake | Array<snowflake>;
|
397
409
|
nonce?: string;
|
398
410
|
}
|
411
|
+
export interface RequestSoundboardSounds {
|
412
|
+
guildIDs: Array<snowflake>;
|
413
|
+
}
|
399
414
|
export interface GatewayPresenceUpdate {
|
400
415
|
since: number | null;
|
401
416
|
activities: Array<Partial<Pick<Activity, "name" | "type" | "url" | "state">>>;
|
@@ -454,6 +469,7 @@ export interface GuildCreateEventExtraFields {
|
|
454
469
|
presences?: Array<PresenceUpdateEventFields>;
|
455
470
|
stageInstances?: Array<StageInstance>;
|
456
471
|
guildScheduledEvents?: Array<GuildScheduledEvent>;
|
472
|
+
soundboardSounds?: Array<SoundboardSound>;
|
457
473
|
}
|
458
474
|
export interface GuildAuditLogEntryCreateExtraFields {
|
459
475
|
guildID: snowflake;
|
@@ -482,6 +498,7 @@ export interface GuildMemberUpdateEventFields {
|
|
482
498
|
user: User;
|
483
499
|
nick?: string | null;
|
484
500
|
avatar: string | null;
|
501
|
+
banner: string | null;
|
485
502
|
joinedAt?: timestamp | null;
|
486
503
|
premiumSince?: number | null;
|
487
504
|
deaf?: boolean;
|
@@ -500,6 +517,10 @@ export interface GuildMembersChunkEventFields {
|
|
500
517
|
presences?: Array<PresenceUpdateEventFields>;
|
501
518
|
nonce?: string;
|
502
519
|
}
|
520
|
+
export interface GuildSoundboardSoundDeleteEventFields {
|
521
|
+
soundID: snowflake;
|
522
|
+
guildID: snowflake;
|
523
|
+
}
|
503
524
|
export interface IntegrationCreateEventExtraFields {
|
504
525
|
guildID: snowflake;
|
505
526
|
}
|
@@ -89,6 +89,7 @@ export interface RawGuildMember {
|
|
89
89
|
user?: RawUser;
|
90
90
|
nick?: string | null;
|
91
91
|
avatar?: string | null;
|
92
|
+
banner?: string | null;
|
92
93
|
roles: Array<snowflake>;
|
93
94
|
joined_at: timestamp;
|
94
95
|
premium_since?: number | null;
|
@@ -257,6 +258,7 @@ export interface GuildMember {
|
|
257
258
|
user?: User;
|
258
259
|
nick?: string | null;
|
259
260
|
avatar?: string | null;
|
261
|
+
banner?: string | null;
|
260
262
|
roles: Array<snowflake>;
|
261
263
|
joinedAt: string;
|
262
264
|
premiumSince?: number | null;
|
@@ -104,6 +104,30 @@ export interface RawInteractionCallbackData {
|
|
104
104
|
custom_id?: string;
|
105
105
|
title?: string;
|
106
106
|
}
|
107
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object */
|
108
|
+
export interface RawInteractionCallbackResponse {
|
109
|
+
interaction: RawInteractionCallback;
|
110
|
+
resource?: RawInteractionResource;
|
111
|
+
}
|
112
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object */
|
113
|
+
export interface RawInteractionCallback {
|
114
|
+
id: snowflake;
|
115
|
+
type: InteractionType;
|
116
|
+
activity_instance_id?: string;
|
117
|
+
response_message_id?: snowflake;
|
118
|
+
response_message_loading?: boolean;
|
119
|
+
response_message_ephemeral?: boolean;
|
120
|
+
}
|
121
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object */
|
122
|
+
export interface RawInteractionResource {
|
123
|
+
type: InteractionCallbackType;
|
124
|
+
activity_instance?: RawActivityInstanceResource;
|
125
|
+
message?: RawMessage;
|
126
|
+
}
|
127
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource */
|
128
|
+
export interface RawActivityInstanceResource {
|
129
|
+
id: string;
|
130
|
+
}
|
107
131
|
export interface Interaction {
|
108
132
|
id: snowflake;
|
109
133
|
applicationID: snowflake;
|
@@ -189,3 +213,23 @@ export interface InteractionCallbackData {
|
|
189
213
|
customID?: string;
|
190
214
|
title?: string;
|
191
215
|
}
|
216
|
+
export interface InteractionCallbackResponse {
|
217
|
+
interaction: InteractionCallback;
|
218
|
+
resource?: InteractionResource;
|
219
|
+
}
|
220
|
+
export interface InteractionCallback {
|
221
|
+
id: snowflake;
|
222
|
+
type: InteractionType;
|
223
|
+
activityInstanceID?: string;
|
224
|
+
responseMessageID?: snowflake;
|
225
|
+
responseMessageLoading?: boolean;
|
226
|
+
responseMessageEphemeral?: boolean;
|
227
|
+
}
|
228
|
+
export interface InteractionResource {
|
229
|
+
type: InteractionCallbackType;
|
230
|
+
activityInstance?: ActivityInstanceResource;
|
231
|
+
message?: Message;
|
232
|
+
}
|
233
|
+
export interface ActivityInstanceResource {
|
234
|
+
id: string;
|
235
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { snowflake } from "./common";
|
2
|
+
import type { RawUser, User } from "./user";
|
3
|
+
/** https://discord.com/developers/docs/resources/soundboard#soundboard-sound-structure */
|
4
|
+
export interface RawSoundboardSound {
|
5
|
+
name: string;
|
6
|
+
sound_id: snowflake;
|
7
|
+
volume: number;
|
8
|
+
emoji_id: snowflake | null;
|
9
|
+
emoji_name: string | null;
|
10
|
+
guild_id?: snowflake;
|
11
|
+
available: boolean;
|
12
|
+
user?: RawUser;
|
13
|
+
}
|
14
|
+
export interface SoundboardSound {
|
15
|
+
name: string;
|
16
|
+
soundID: snowflake;
|
17
|
+
volume: number;
|
18
|
+
emojiID: snowflake | null;
|
19
|
+
emojiName: string | null;
|
20
|
+
guildID?: snowflake;
|
21
|
+
available: boolean;
|
22
|
+
user?: User;
|
23
|
+
}
|
package/dist/lib/utils/CDN.d.ts
CHANGED
@@ -18,6 +18,7 @@ export declare const roleIcon: (roleID: snowflake, icon: string, imageFormat?: I
|
|
18
18
|
export declare const stickerPackBanner: (assetID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
19
19
|
export declare const sticker: (stickerID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.Lottie | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
20
20
|
export declare const storePageAsset: (applicationID: snowflake, assetID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
21
|
+
export declare const soundboardSound: (soundID: snowflake) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
21
22
|
export declare const teamIcon: (teamID: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
22
23
|
export declare const userAvatar: (userID: snowflake, avatar: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
23
24
|
export declare const userAvatarDecoration: (userID: snowflake, avatarDecoration: string) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
package/dist/lib/utils/CDN.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
/* https://discord.com/developers/docs/reference#image-formatting */
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildSplash = exports.guildScheduledEventCover = exports.guildMemberBanner = exports.guildMemberAvatar = exports.guildIcon = exports.guildDiscoverySplash = exports.guildBanner = exports.defaultUserAvatar = exports.customEmoji = exports.applicationIcon = exports.applicationCover = exports.applicationAsset = exports.achievementIcon = exports.cdnURL = void 0;
|
4
|
+
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.soundboardSound = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildSplash = exports.guildScheduledEventCover = exports.guildMemberBanner = exports.guildMemberAvatar = exports.guildIcon = exports.guildDiscoverySplash = exports.guildBanner = exports.defaultUserAvatar = exports.customEmoji = exports.applicationIcon = exports.applicationCover = exports.applicationAsset = exports.achievementIcon = exports.cdnURL = void 0;
|
5
5
|
const constants_1 = require("../constants");
|
6
6
|
const cdnURL = (cdnEndpoint, imageFormat = constants_1.ImageFormats.PNG) => `https://cdn.discordapp.com/${cdnEndpoint}.${imageFormat}`;
|
7
7
|
exports.cdnURL = cdnURL;
|
@@ -39,6 +39,8 @@ const sticker = (stickerID, imageFormat = constants_1.ImageFormats.PNG) => (0, e
|
|
39
39
|
exports.sticker = sticker;
|
40
40
|
const storePageAsset = (applicationID, assetID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/${applicationID}/store/${assetID}`, imageFormat);
|
41
41
|
exports.storePageAsset = storePageAsset;
|
42
|
+
const soundboardSound = (soundID) => (0, exports.cdnURL)(`soundboard-sounds/${soundID}`);
|
43
|
+
exports.soundboardSound = soundboardSound;
|
42
44
|
const teamIcon = (teamID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`team-icons/${teamID}/${icon}`, imageFormat);
|
43
45
|
exports.teamIcon = teamIcon;
|
44
46
|
const userAvatar = (userID, avatar, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`avatars/${userID}/${avatar}`, imageFormat);
|
package/dist/package.json
CHANGED