disgroove 2.2.4 → 2.2.5-dev.3beface
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 +51 -4
- package/dist/lib/Client.js +190 -72
- package/dist/lib/constants.d.ts +36 -5
- package/dist/lib/constants.js +35 -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/lib/utils/formatters.d.ts +2 -2
- package/dist/lib/utils/formatters.js +5 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/constants.d.ts
CHANGED
@@ -12,7 +12,8 @@ export declare enum TimestampStyles {
|
|
12
12
|
export declare enum GuildNavigationTypes {
|
13
13
|
Customize = "customize",
|
14
14
|
BrowseChannels = "browse",
|
15
|
-
ServerGuide = "guide"
|
15
|
+
ServerGuide = "guide",
|
16
|
+
LinkedRoles = "linked-roles"
|
16
17
|
}
|
17
18
|
/** https://discord.com/developers/docs/reference#image-formatting-image-formats */
|
18
19
|
export declare enum ImageFormats {
|
@@ -62,7 +63,8 @@ export declare enum Locales {
|
|
62
63
|
export declare enum ApplicationCommandTypes {
|
63
64
|
ChatInput = 1,
|
64
65
|
User = 2,
|
65
|
-
Message = 3
|
66
|
+
Message = 3,
|
67
|
+
PrimaryEntryPoint = 4
|
66
68
|
}
|
67
69
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
|
68
70
|
export declare enum ApplicationCommandOptionType {
|
@@ -78,6 +80,11 @@ export declare enum ApplicationCommandOptionType {
|
|
78
80
|
Number = 10,
|
79
81
|
Attachment = 11
|
80
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
|
+
}
|
81
88
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
|
82
89
|
export declare enum ApplicationCommandPermissionType {
|
83
90
|
Role = 1,
|
@@ -118,7 +125,8 @@ export declare enum InteractionCallbackType {
|
|
118
125
|
UpdateMessage = 7,
|
119
126
|
ApplicationCommandAutocompleteResult = 8,
|
120
127
|
Modal = 9,
|
121
|
-
PremiumRequired = 10
|
128
|
+
PremiumRequired = 10,
|
129
|
+
LaunchActivity = 12
|
122
130
|
}
|
123
131
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
124
132
|
export declare enum ButtonStyles {
|
@@ -218,6 +226,9 @@ export declare enum AuditLogEvents {
|
|
218
226
|
ThreadUpdate = 111,
|
219
227
|
ThreadDelete = 112,
|
220
228
|
ApplicationCommandPermissionUpdate = 121,
|
229
|
+
SoundboardSoundCreate = 130,
|
230
|
+
SoundboardSoundUpdate = 131,
|
231
|
+
SoundboardSoundDelete = 132,
|
221
232
|
AutoModerationRuleCreate = 140,
|
222
233
|
AutoModerationRuleUpdate = 141,
|
223
234
|
AutoModerationRuleDelete = 142,
|
@@ -361,6 +372,7 @@ export declare enum GuildFeatures {
|
|
361
372
|
InvitesDisabled = "INVITES_DISABLED",
|
362
373
|
InviteSplash = "INVITE_SPLASH",
|
363
374
|
MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
|
375
|
+
MoreSoundboard = "MORE_SOUNDBOARD",
|
364
376
|
MoreStickers = "MORE_STICKERS",
|
365
377
|
News = "NEWS",
|
366
378
|
Partnered = "PARTNERED",
|
@@ -369,6 +381,7 @@ export declare enum GuildFeatures {
|
|
369
381
|
RoleIcons = "ROLE_ICONS",
|
370
382
|
RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
|
371
383
|
RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
|
384
|
+
Soundboard = "SOUNDBOARD",
|
372
385
|
TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
|
373
386
|
VanityURL = "VANITY_URL",
|
374
387
|
Verified = "VERIFIED",
|
@@ -616,6 +629,7 @@ export declare enum PremiumTypes {
|
|
616
629
|
}
|
617
630
|
/** https://discord.com/developers/docs/resources/user#connection-object-services */
|
618
631
|
export declare enum Services {
|
632
|
+
AmazonMusic = "amazon-music",
|
619
633
|
BattleNet = "battlenet",
|
620
634
|
Ebay = "ebay",
|
621
635
|
EpicGames = "epicgames",
|
@@ -665,7 +679,7 @@ export declare enum GatewayIntents {
|
|
665
679
|
Guilds = 1,
|
666
680
|
GuildMembers = 2,
|
667
681
|
GuildModeration = 4,
|
668
|
-
|
682
|
+
GuildExpressions = 8,
|
669
683
|
GuildIntegrations = 16,
|
670
684
|
GuildWebhooks = 32,
|
671
685
|
GuildInvites = 64,
|
@@ -738,6 +752,11 @@ export declare enum GatewayEvents {
|
|
738
752
|
GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
|
739
753
|
GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
|
740
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",
|
741
760
|
IntegrationCreate = "INTEGRATION_CREATE",
|
742
761
|
IntegrationUpdate = "INTEGRATION_UPDATE",
|
743
762
|
IntegrationDelete = "INTEGRATION_DELETE",
|
@@ -837,7 +856,8 @@ export declare enum GatewayOPCodes {
|
|
837
856
|
RequestGuildMembers = 8,
|
838
857
|
InvalidSession = 9,
|
839
858
|
Hello = 10,
|
840
|
-
HeartbeatACK = 11
|
859
|
+
HeartbeatACK = 11,
|
860
|
+
RequestSoundboardSounds = 31
|
841
861
|
}
|
842
862
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
843
863
|
export declare enum GatewayCloseEventCodes {
|
@@ -919,6 +939,7 @@ export declare enum JSONErrorCodes {
|
|
919
939
|
UnknownWebhook = 10015,
|
920
940
|
UnknownWebhookService = 10016,
|
921
941
|
UnknownSession = 10020,
|
942
|
+
UnknownAsset = 10021,
|
922
943
|
UnknownBan = 10026,
|
923
944
|
UnknownSKU = 10027,
|
924
945
|
UnknownStoreListing = 10028,
|
@@ -945,6 +966,7 @@ export declare enum JSONErrorCodes {
|
|
945
966
|
UnknownGuildScheduledEvent = 10070,
|
946
967
|
UnknownGuildScheduledEventUser = 10071,
|
947
968
|
UnknownTag = 10087,
|
969
|
+
UnknownSound = 10091,
|
948
970
|
BotsCannotUseThisEndpoint = 20001,
|
949
971
|
OnlyBotsCanUseThisEndpoint = 20002,
|
950
972
|
ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
|
@@ -983,6 +1005,7 @@ export declare enum JSONErrorCodes {
|
|
983
1005
|
MaximumNumberOfStickersReached = 30039,
|
984
1006
|
MaximumNumberOfPruneRequestsHasBeenReached = 30040,
|
985
1007
|
MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042,
|
1008
|
+
MaximumNumberOfSoundboardSoundsReached = 30045,
|
986
1009
|
MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
|
987
1010
|
MaximumNumberOfPinnedThreadsInForumHasBeenReached = 30047,
|
988
1011
|
MaximumNumberOfTagsInForumHasBeenReached = 30048,
|
@@ -999,6 +1022,8 @@ export declare enum JSONErrorCodes {
|
|
999
1022
|
FeatureTemporarilyDisabledServerSide = 40006,
|
1000
1023
|
UserBannedFromThisGuild = 40007,
|
1001
1024
|
ConnectionHasBeenRevoked = 40012,
|
1025
|
+
OnlyConsumableSKUsCanBeConsumed = 40018,
|
1026
|
+
YouCanOnlyDeleteSandboxEntitlements = 40019,
|
1002
1027
|
TargetUserIsNotConnectedToVoice = 40032,
|
1003
1028
|
ThisMessageWasAlreadyCrossposted = 40033,
|
1004
1029
|
ApplicationCommandWithThatNameAlreadyExists = 40041,
|
@@ -1010,6 +1035,7 @@ export declare enum JSONErrorCodes {
|
|
1010
1035
|
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
|
1011
1036
|
TagRequiredToCreateAForumPostInThisChannel = 40067,
|
1012
1037
|
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40074,
|
1038
|
+
ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages = 40094,
|
1013
1039
|
CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent = 40333,
|
1014
1040
|
MissingAccess = 50001,
|
1015
1041
|
InvalidAccountType = 50002,
|
@@ -1063,12 +1089,16 @@ export declare enum JSONErrorCodes {
|
|
1063
1089
|
ServerNeedsMonetizationEnabledToPerformThisAction = 50097,
|
1064
1090
|
ServerNeedsMoreBoostsToPerformThisAction = 50101,
|
1065
1091
|
RequestBodyContainsInvalidJSON = 50109,
|
1092
|
+
TheProvidedFileIsInvalid = 50110,
|
1093
|
+
TheProvidedFileTypeIsInvalid = 50123,
|
1094
|
+
TheProvidedFileDurationExceedsMaximumOf5Seconds = 50124,
|
1066
1095
|
OwnerCannotBePendingMember = 50131,
|
1067
1096
|
OwnershipCannotBeMovedToABotUser = 50132,
|
1068
1097
|
FailedToResizeAssetBelowTheMinimumSize = 50138,
|
1069
1098
|
CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50144,
|
1070
1099
|
CannotConvertBetweenPremiumEmojiAndNormalEmoji = 50145,
|
1071
1100
|
UploadedFileNotFound = 50146,
|
1101
|
+
TheSpecifiedEmojiIsInvalid = 50151,
|
1072
1102
|
VoiceMessagesDoNotSupportAdditionalContent = 50159,
|
1073
1103
|
VoiceMessagesMustHaveASingleAudioAttachment = 50160,
|
1074
1104
|
VoiceMessagesMustHaveSupportingMetadata = 50161,
|
@@ -1076,6 +1106,7 @@ export declare enum JSONErrorCodes {
|
|
1076
1106
|
CannotDeleteGuildSubscriptionIntegration = 50163,
|
1077
1107
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
1078
1108
|
TheUserAccountMustFirstBeVerified = 50178,
|
1109
|
+
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
1079
1110
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
1080
1111
|
TwoFactorAuthenticationIsRequired = 60003,
|
1081
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) {
|
@@ -19,6 +19,7 @@ var GuildNavigationTypes;
|
|
19
19
|
GuildNavigationTypes["Customize"] = "customize";
|
20
20
|
GuildNavigationTypes["BrowseChannels"] = "browse";
|
21
21
|
GuildNavigationTypes["ServerGuide"] = "guide";
|
22
|
+
GuildNavigationTypes["LinkedRoles"] = "linked-roles";
|
22
23
|
})(GuildNavigationTypes || (exports.GuildNavigationTypes = GuildNavigationTypes = {}));
|
23
24
|
/** https://discord.com/developers/docs/reference#image-formatting-image-formats */
|
24
25
|
var ImageFormats;
|
@@ -72,6 +73,7 @@ var ApplicationCommandTypes;
|
|
72
73
|
ApplicationCommandTypes[ApplicationCommandTypes["ChatInput"] = 1] = "ChatInput";
|
73
74
|
ApplicationCommandTypes[ApplicationCommandTypes["User"] = 2] = "User";
|
74
75
|
ApplicationCommandTypes[ApplicationCommandTypes["Message"] = 3] = "Message";
|
76
|
+
ApplicationCommandTypes[ApplicationCommandTypes["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
|
75
77
|
})(ApplicationCommandTypes || (exports.ApplicationCommandTypes = ApplicationCommandTypes = {}));
|
76
78
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
|
77
79
|
var ApplicationCommandOptionType;
|
@@ -88,6 +90,12 @@ var ApplicationCommandOptionType;
|
|
88
90
|
ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
|
89
91
|
ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
|
90
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 = {}));
|
91
99
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
|
92
100
|
var ApplicationCommandPermissionType;
|
93
101
|
(function (ApplicationCommandPermissionType) {
|
@@ -134,6 +142,7 @@ var InteractionCallbackType;
|
|
134
142
|
InteractionCallbackType[InteractionCallbackType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
|
135
143
|
InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
|
136
144
|
InteractionCallbackType[InteractionCallbackType["PremiumRequired"] = 10] = "PremiumRequired";
|
145
|
+
InteractionCallbackType[InteractionCallbackType["LaunchActivity"] = 12] = "LaunchActivity";
|
137
146
|
})(InteractionCallbackType || (exports.InteractionCallbackType = InteractionCallbackType = {}));
|
138
147
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-styles */
|
139
148
|
var ButtonStyles;
|
@@ -240,6 +249,9 @@ var AuditLogEvents;
|
|
240
249
|
AuditLogEvents[AuditLogEvents["ThreadUpdate"] = 111] = "ThreadUpdate";
|
241
250
|
AuditLogEvents[AuditLogEvents["ThreadDelete"] = 112] = "ThreadDelete";
|
242
251
|
AuditLogEvents[AuditLogEvents["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate";
|
252
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundCreate"] = 130] = "SoundboardSoundCreate";
|
253
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundUpdate"] = 131] = "SoundboardSoundUpdate";
|
254
|
+
AuditLogEvents[AuditLogEvents["SoundboardSoundDelete"] = 132] = "SoundboardSoundDelete";
|
243
255
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate";
|
244
256
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate";
|
245
257
|
AuditLogEvents[AuditLogEvents["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete";
|
@@ -400,6 +412,7 @@ var GuildFeatures;
|
|
400
412
|
GuildFeatures["InvitesDisabled"] = "INVITES_DISABLED";
|
401
413
|
GuildFeatures["InviteSplash"] = "INVITE_SPLASH";
|
402
414
|
GuildFeatures["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
|
415
|
+
GuildFeatures["MoreSoundboard"] = "MORE_SOUNDBOARD";
|
403
416
|
GuildFeatures["MoreStickers"] = "MORE_STICKERS";
|
404
417
|
GuildFeatures["News"] = "NEWS";
|
405
418
|
GuildFeatures["Partnered"] = "PARTNERED";
|
@@ -408,6 +421,7 @@ var GuildFeatures;
|
|
408
421
|
GuildFeatures["RoleIcons"] = "ROLE_ICONS";
|
409
422
|
GuildFeatures["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE";
|
410
423
|
GuildFeatures["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
|
424
|
+
GuildFeatures["Soundboard"] = "SOUNDBOARD";
|
411
425
|
GuildFeatures["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED";
|
412
426
|
GuildFeatures["VanityURL"] = "VANITY_URL";
|
413
427
|
GuildFeatures["Verified"] = "VERIFIED";
|
@@ -684,6 +698,7 @@ var PremiumTypes;
|
|
684
698
|
/** https://discord.com/developers/docs/resources/user#connection-object-services */
|
685
699
|
var Services;
|
686
700
|
(function (Services) {
|
701
|
+
Services["AmazonMusic"] = "amazon-music";
|
687
702
|
Services["BattleNet"] = "battlenet";
|
688
703
|
Services["Ebay"] = "ebay";
|
689
704
|
Services["EpicGames"] = "epicgames";
|
@@ -738,7 +753,7 @@ var GatewayIntents;
|
|
738
753
|
GatewayIntents[GatewayIntents["Guilds"] = 1] = "Guilds";
|
739
754
|
GatewayIntents[GatewayIntents["GuildMembers"] = 2] = "GuildMembers";
|
740
755
|
GatewayIntents[GatewayIntents["GuildModeration"] = 4] = "GuildModeration";
|
741
|
-
GatewayIntents[GatewayIntents["
|
756
|
+
GatewayIntents[GatewayIntents["GuildExpressions"] = 8] = "GuildExpressions";
|
742
757
|
GatewayIntents[GatewayIntents["GuildIntegrations"] = 16] = "GuildIntegrations";
|
743
758
|
GatewayIntents[GatewayIntents["GuildWebhooks"] = 32] = "GuildWebhooks";
|
744
759
|
GatewayIntents[GatewayIntents["GuildInvites"] = 64] = "GuildInvites";
|
@@ -813,6 +828,11 @@ var GatewayEvents;
|
|
813
828
|
GatewayEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
|
814
829
|
GatewayEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
|
815
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";
|
816
836
|
GatewayEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
|
817
837
|
GatewayEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
|
818
838
|
GatewayEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
|
@@ -918,6 +938,7 @@ var GatewayOPCodes;
|
|
918
938
|
GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession";
|
919
939
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
920
940
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
941
|
+
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
921
942
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
922
943
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
923
944
|
var GatewayCloseEventCodes;
|
@@ -1004,6 +1025,7 @@ var JSONErrorCodes;
|
|
1004
1025
|
JSONErrorCodes[JSONErrorCodes["UnknownWebhook"] = 10015] = "UnknownWebhook";
|
1005
1026
|
JSONErrorCodes[JSONErrorCodes["UnknownWebhookService"] = 10016] = "UnknownWebhookService";
|
1006
1027
|
JSONErrorCodes[JSONErrorCodes["UnknownSession"] = 10020] = "UnknownSession";
|
1028
|
+
JSONErrorCodes[JSONErrorCodes["UnknownAsset"] = 10021] = "UnknownAsset";
|
1007
1029
|
JSONErrorCodes[JSONErrorCodes["UnknownBan"] = 10026] = "UnknownBan";
|
1008
1030
|
JSONErrorCodes[JSONErrorCodes["UnknownSKU"] = 10027] = "UnknownSKU";
|
1009
1031
|
JSONErrorCodes[JSONErrorCodes["UnknownStoreListing"] = 10028] = "UnknownStoreListing";
|
@@ -1030,6 +1052,7 @@ var JSONErrorCodes;
|
|
1030
1052
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildScheduledEvent"] = 10070] = "UnknownGuildScheduledEvent";
|
1031
1053
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildScheduledEventUser"] = 10071] = "UnknownGuildScheduledEventUser";
|
1032
1054
|
JSONErrorCodes[JSONErrorCodes["UnknownTag"] = 10087] = "UnknownTag";
|
1055
|
+
JSONErrorCodes[JSONErrorCodes["UnknownSound"] = 10091] = "UnknownSound";
|
1033
1056
|
JSONErrorCodes[JSONErrorCodes["BotsCannotUseThisEndpoint"] = 20001] = "BotsCannotUseThisEndpoint";
|
1034
1057
|
JSONErrorCodes[JSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
|
1035
1058
|
JSONErrorCodes[JSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
|
@@ -1068,6 +1091,7 @@ var JSONErrorCodes;
|
|
1068
1091
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfStickersReached"] = 30039] = "MaximumNumberOfStickersReached";
|
1069
1092
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfPruneRequestsHasBeenReached"] = 30040] = "MaximumNumberOfPruneRequestsHasBeenReached";
|
1070
1093
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached"] = 30042] = "MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached";
|
1094
|
+
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfSoundboardSoundsReached"] = 30045] = "MaximumNumberOfSoundboardSoundsReached";
|
1071
1095
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfEditsToMessagesOlderThanOneHourReached"] = 30046] = "MaximumNumberOfEditsToMessagesOlderThanOneHourReached";
|
1072
1096
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfPinnedThreadsInForumHasBeenReached"] = 30047] = "MaximumNumberOfPinnedThreadsInForumHasBeenReached";
|
1073
1097
|
JSONErrorCodes[JSONErrorCodes["MaximumNumberOfTagsInForumHasBeenReached"] = 30048] = "MaximumNumberOfTagsInForumHasBeenReached";
|
@@ -1084,6 +1108,8 @@ var JSONErrorCodes;
|
|
1084
1108
|
JSONErrorCodes[JSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide";
|
1085
1109
|
JSONErrorCodes[JSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild";
|
1086
1110
|
JSONErrorCodes[JSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
|
1111
|
+
JSONErrorCodes[JSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed";
|
1112
|
+
JSONErrorCodes[JSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements";
|
1087
1113
|
JSONErrorCodes[JSONErrorCodes["TargetUserIsNotConnectedToVoice"] = 40032] = "TargetUserIsNotConnectedToVoice";
|
1088
1114
|
JSONErrorCodes[JSONErrorCodes["ThisMessageWasAlreadyCrossposted"] = 40033] = "ThisMessageWasAlreadyCrossposted";
|
1089
1115
|
JSONErrorCodes[JSONErrorCodes["ApplicationCommandWithThatNameAlreadyExists"] = 40041] = "ApplicationCommandWithThatNameAlreadyExists";
|
@@ -1095,6 +1121,7 @@ var JSONErrorCodes;
|
|
1095
1121
|
JSONErrorCodes[JSONErrorCodes["ThereAreNoTagsAvailableThatCanBeSetByNonModerators"] = 40066] = "ThereAreNoTagsAvailableThatCanBeSetByNonModerators";
|
1096
1122
|
JSONErrorCodes[JSONErrorCodes["TagRequiredToCreateAForumPostInThisChannel"] = 40067] = "TagRequiredToCreateAForumPostInThisChannel";
|
1097
1123
|
JSONErrorCodes[JSONErrorCodes["AnEntitlementHasAlreadyBeenGrantedForThisResource"] = 40074] = "AnEntitlementHasAlreadyBeenGrantedForThisResource";
|
1124
|
+
JSONErrorCodes[JSONErrorCodes["ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages"] = 40094] = "ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages";
|
1098
1125
|
JSONErrorCodes[JSONErrorCodes["CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent"] = 40333] = "CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent";
|
1099
1126
|
JSONErrorCodes[JSONErrorCodes["MissingAccess"] = 50001] = "MissingAccess";
|
1100
1127
|
JSONErrorCodes[JSONErrorCodes["InvalidAccountType"] = 50002] = "InvalidAccountType";
|
@@ -1148,12 +1175,16 @@ var JSONErrorCodes;
|
|
1148
1175
|
JSONErrorCodes[JSONErrorCodes["ServerNeedsMonetizationEnabledToPerformThisAction"] = 50097] = "ServerNeedsMonetizationEnabledToPerformThisAction";
|
1149
1176
|
JSONErrorCodes[JSONErrorCodes["ServerNeedsMoreBoostsToPerformThisAction"] = 50101] = "ServerNeedsMoreBoostsToPerformThisAction";
|
1150
1177
|
JSONErrorCodes[JSONErrorCodes["RequestBodyContainsInvalidJSON"] = 50109] = "RequestBodyContainsInvalidJSON";
|
1178
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileIsInvalid"] = 50110] = "TheProvidedFileIsInvalid";
|
1179
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileTypeIsInvalid"] = 50123] = "TheProvidedFileTypeIsInvalid";
|
1180
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDurationExceedsMaximumOf5Seconds"] = 50124] = "TheProvidedFileDurationExceedsMaximumOf5Seconds";
|
1151
1181
|
JSONErrorCodes[JSONErrorCodes["OwnerCannotBePendingMember"] = 50131] = "OwnerCannotBePendingMember";
|
1152
1182
|
JSONErrorCodes[JSONErrorCodes["OwnershipCannotBeMovedToABotUser"] = 50132] = "OwnershipCannotBeMovedToABotUser";
|
1153
1183
|
JSONErrorCodes[JSONErrorCodes["FailedToResizeAssetBelowTheMinimumSize"] = 50138] = "FailedToResizeAssetBelowTheMinimumSize";
|
1154
1184
|
JSONErrorCodes[JSONErrorCodes["CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"] = 50144] = "CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji";
|
1155
1185
|
JSONErrorCodes[JSONErrorCodes["CannotConvertBetweenPremiumEmojiAndNormalEmoji"] = 50145] = "CannotConvertBetweenPremiumEmojiAndNormalEmoji";
|
1156
1186
|
JSONErrorCodes[JSONErrorCodes["UploadedFileNotFound"] = 50146] = "UploadedFileNotFound";
|
1187
|
+
JSONErrorCodes[JSONErrorCodes["TheSpecifiedEmojiIsInvalid"] = 50151] = "TheSpecifiedEmojiIsInvalid";
|
1157
1188
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesDoNotSupportAdditionalContent"] = 50159] = "VoiceMessagesDoNotSupportAdditionalContent";
|
1158
1189
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveASingleAudioAttachment"] = 50160] = "VoiceMessagesMustHaveASingleAudioAttachment";
|
1159
1190
|
JSONErrorCodes[JSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
|
@@ -1161,6 +1192,7 @@ var JSONErrorCodes;
|
|
1161
1192
|
JSONErrorCodes[JSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
|
1162
1193
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
1163
1194
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
1195
|
+
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
1164
1196
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
1165
1197
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
1166
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);
|