disgroove 2.2.5-dev.4e978d8 → 2.2.5-dev.5577cd8
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 +48 -4
- package/dist/lib/Client.js +148 -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/entitlements.d.ts +4 -4
- 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/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;
|
@@ -9,8 +9,8 @@ export interface RawEntitlement {
|
|
9
9
|
type: EntitlementTypes;
|
10
10
|
deleted: boolean;
|
11
11
|
consumed?: boolean;
|
12
|
-
starts_at
|
13
|
-
ends_at
|
12
|
+
starts_at: timestamp | null;
|
13
|
+
ends_at: timestamp | null;
|
14
14
|
guild_id?: snowflake;
|
15
15
|
}
|
16
16
|
export interface Entitlement {
|
@@ -21,7 +21,7 @@ export interface Entitlement {
|
|
21
21
|
type: EntitlementTypes;
|
22
22
|
deleted: boolean;
|
23
23
|
consumed?: boolean;
|
24
|
-
startsAt
|
25
|
-
endsAt
|
24
|
+
startsAt: timestamp | null;
|
25
|
+
endsAt: timestamp | null;
|
26
26
|
guildID?: snowflake;
|
27
27
|
}
|
@@ -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
|
+
}
|