disgroove 3.0.1-dev.6d98962 → 3.0.1-dev.7231e6e
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/LICENSE +1 -1
- package/dist/lib/Client.d.ts +60 -11
- package/dist/lib/Client.js +86 -23
- package/dist/lib/constants.d.ts +26 -7
- package/dist/lib/constants.js +25 -5
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +19 -0
- package/dist/lib/gateway/Shard.js +1 -0
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +8 -0
- package/dist/lib/rest/Endpoints.d.ts +6 -1
- package/dist/lib/rest/Endpoints.js +12 -2
- package/dist/lib/rest/RequestManager.d.ts +1 -0
- package/dist/lib/rest/RequestManager.js +2 -3
- package/dist/lib/transformers/ApplicationCommands.js +2 -0
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Channels.d.ts +3 -0
- package/dist/lib/transformers/Channels.js +24 -0
- package/dist/lib/transformers/Components.js +2 -0
- package/dist/lib/transformers/Lobbies.d.ts +3 -1
- package/dist/lib/transformers/Lobbies.js +31 -0
- package/dist/lib/types/application-command.d.ts +2 -0
- package/dist/lib/types/application.d.ts +2 -0
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/channel.d.ts +4 -2
- package/dist/lib/types/components.d.ts +4 -2
- package/dist/lib/types/gateway-events.d.ts +63 -1
- package/dist/lib/types/lobby.d.ts +38 -1
- package/dist/lib/types/message.d.ts +20 -0
- package/dist/package.json +4 -3
- package/package.json +5 -4
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright ©
|
|
3
|
+
Copyright © 2026 Sergio Gotuzzo
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/dist/lib/Client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, 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, type LobbyMemberFlags, type InviteTargetUsersJobStatusErrorCodes, type AuthorTypes, type SearchHasTypes, type SearchEmbedTypes, type SearchSortModes } from "./constants";
|
|
1
|
+
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, 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, type LobbyMemberFlags, type InviteTargetUsersJobStatusErrorCodes, type AuthorTypes, type SearchHasTypes, type SearchEmbedTypes, type SearchSortModes, EntryPointCommandHandlerTypes, GatewayCapabilities } from "./constants";
|
|
2
2
|
import { RequestManager, type FileData } from "./rest";
|
|
3
3
|
import EventEmitter from "node:events";
|
|
4
4
|
import { Shard } from "./gateway";
|
|
@@ -11,7 +11,7 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
|
|
|
11
11
|
import type { LocaleMap, snowflake, timestamp } from "./types/common";
|
|
12
12
|
import type { Emoji } from "./types/emoji";
|
|
13
13
|
import type { Entitlement } from "./types/entitlements";
|
|
14
|
-
import type { AutoModerationActionExecutionEvent, ChannelPinsUpdateEvent, ThreadListSyncEvent, ThreadMemberUpdateEventExtra, ThreadMembersUpdateEvent, GuildCreateEventExtra, GuildAuditLogEntryCreateExtra, GuildBanAddEvent, GuildBanRemoveEvent, GuildMemberAddEventExtra, GuildMemberRemoveEvent, GuildMemberUpdateEvent, GuildMembersChunkEvent, IntegrationCreateEventExtra, IntegrationUpdateEventExtra, IntegrationDeleteEvent, InviteCreateEvent, InviteDeleteEvent, MessageCreateEventExtra, MessageDeleteEvent, MessageDeleteBulkEvent, MessageReactionAddEvent, MessageReactionRemoveEvent, MessageReactionRemoveAllEvent, MessageReactionRemoveEmojiEvent, PresenceUpdateEvent, TypingStartEvent, VoiceServerUpdateEvent, MessagePollVoteAddEvent, MessagePollVoteRemoveEvent, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEvent, GuildSoundboardSoundDeleteEvent, RateLimitedEvent } from "./types/gateway-events";
|
|
14
|
+
import type { AutoModerationActionExecutionEvent, ChannelPinsUpdateEvent, ThreadListSyncEvent, ThreadMemberUpdateEventExtra, ThreadMembersUpdateEvent, GuildCreateEventExtra, GuildAuditLogEntryCreateExtra, GuildBanAddEvent, GuildBanRemoveEvent, GuildMemberAddEventExtra, GuildMemberRemoveEvent, GuildMemberUpdateEvent, GuildMembersChunkEvent, IntegrationCreateEventExtra, IntegrationUpdateEventExtra, IntegrationDeleteEvent, InviteCreateEvent, InviteDeleteEvent, MessageCreateEventExtra, MessageDeleteEvent, MessageDeleteBulkEvent, MessageReactionAddEvent, MessageReactionRemoveEvent, MessageReactionRemoveAllEvent, MessageReactionRemoveEmojiEvent, PresenceUpdateEvent, TypingStartEvent, VoiceServerUpdateEvent, MessagePollVoteAddEvent, MessagePollVoteRemoveEvent, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEvent, GuildSoundboardSoundDeleteEvent, RateLimitedEvent, ChannelInfoEvent, VoiceChannelStatusUpdateEvent, VoiceChannelStartTimeUpdateEvent } from "./types/gateway-events";
|
|
15
15
|
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel, IncidentsData } from "./types/guild";
|
|
16
16
|
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
|
17
17
|
import type { GuildTemplate } from "./types/guild-template";
|
|
@@ -26,17 +26,18 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
|
|
|
26
26
|
import type { VoiceRegion, VoiceState } from "./types/voice";
|
|
27
27
|
import type { Webhook } from "./types/webhook";
|
|
28
28
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
|
29
|
-
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme } from "./types/message";
|
|
29
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme, AttachmentRequest } from "./types/message";
|
|
30
30
|
import type { Subscription } from "./types/subscription";
|
|
31
31
|
import type { SoundboardSound } from "./types/soundboard";
|
|
32
32
|
import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/components";
|
|
33
|
-
import type
|
|
33
|
+
import { LobbyInvite, type Lobby, type LobbyMember, type LobbyMessage } from "./types/lobby";
|
|
34
34
|
export interface GatewayOptions {
|
|
35
35
|
properties?: IdentifyConnectionProperties;
|
|
36
36
|
compress?: boolean;
|
|
37
37
|
largeThreshold?: number;
|
|
38
38
|
presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
|
|
39
39
|
intents?: number | Array<number>;
|
|
40
|
+
capabilities?: GatewayCapabilities;
|
|
40
41
|
}
|
|
41
42
|
export interface ClientOptions {
|
|
42
43
|
shardsCount?: number | "auto";
|
|
@@ -52,6 +53,7 @@ export declare class Client extends EventEmitter {
|
|
|
52
53
|
largeThreshold?: number;
|
|
53
54
|
presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
|
|
54
55
|
intents: GatewayIntents | number;
|
|
56
|
+
capabilities?: GatewayCapabilities;
|
|
55
57
|
shardsCount: number | "auto";
|
|
56
58
|
auth: "Bot" | "Bearer";
|
|
57
59
|
reconnect: boolean;
|
|
@@ -131,6 +133,13 @@ export declare class Client extends EventEmitter {
|
|
|
131
133
|
type?: ApplicationCommandTypes;
|
|
132
134
|
nsfw?: boolean;
|
|
133
135
|
}>): Promise<Array<ApplicationCommand>>;
|
|
136
|
+
/** https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members */
|
|
137
|
+
bulkUpdateLobbyMembers(lobbyId: snowflake, options: {
|
|
138
|
+
id: snowflake;
|
|
139
|
+
metadata?: Record<string, string> | null;
|
|
140
|
+
flags?: LobbyMemberFlags;
|
|
141
|
+
removeMember?: boolean;
|
|
142
|
+
}): Promise<Array<LobbyMember>>;
|
|
134
143
|
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
135
144
|
connect(): Promise<void>;
|
|
136
145
|
/** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
|
|
@@ -171,6 +180,7 @@ export declare class Client extends EventEmitter {
|
|
|
171
180
|
defaultSortOrder?: SortOrderTypes | null;
|
|
172
181
|
defaultForumLayout?: ForumLayoutTypes | null;
|
|
173
182
|
defaultThreadRateLimitPerUser?: number | null;
|
|
183
|
+
flags?: ChannelFlags;
|
|
174
184
|
}, reason?: string): Promise<Channel>;
|
|
175
185
|
/** https://discord.com/developers/docs/resources/channel#create-channel-invite */
|
|
176
186
|
createChannelInvite(channelId: snowflake, options: {
|
|
@@ -205,6 +215,7 @@ export declare class Client extends EventEmitter {
|
|
|
205
215
|
contexts?: Array<InteractionContextTypes>;
|
|
206
216
|
type?: ApplicationCommandTypes;
|
|
207
217
|
nsfw?: boolean;
|
|
218
|
+
handler?: EntryPointCommandHandlerTypes;
|
|
208
219
|
}): Promise<ApplicationCommand>;
|
|
209
220
|
/** https://discord.com/developers/docs/resources/user#create-group-dm */
|
|
210
221
|
createGroup(options: {
|
|
@@ -298,9 +309,15 @@ export declare class Client extends EventEmitter {
|
|
|
298
309
|
/** https://discord.com/developers/docs/resources/lobby#create-lobby */
|
|
299
310
|
createLobby(options?: {
|
|
300
311
|
metadata?: Record<string, string> | null;
|
|
301
|
-
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags"
|
|
312
|
+
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags"> & {
|
|
313
|
+
additionalName?: string | null;
|
|
314
|
+
}>;
|
|
302
315
|
idleTimeoutSeconds?: number;
|
|
303
316
|
}): Promise<Lobby>;
|
|
317
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-self */
|
|
318
|
+
createLobbyChannelSelfInvite(lobbyId: snowflake): Promise<LobbyInvite>;
|
|
319
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user */
|
|
320
|
+
createLobbyChannelUserInvite(lobbyId: snowflake, userId: snowflake): Promise<LobbyInvite>;
|
|
304
321
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
|
305
322
|
createMessage(channelId: snowflake, options: {
|
|
306
323
|
content?: string;
|
|
@@ -312,7 +329,7 @@ export declare class Client extends EventEmitter {
|
|
|
312
329
|
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
313
330
|
stickersIds?: Array<snowflake>;
|
|
314
331
|
files?: Array<FileData>;
|
|
315
|
-
attachments?: Array<
|
|
332
|
+
attachments?: Array<AttachmentRequest>;
|
|
316
333
|
flags?: MessageFlags;
|
|
317
334
|
enforceNonce?: boolean;
|
|
318
335
|
poll?: PollCreateParams;
|
|
@@ -345,7 +362,7 @@ export declare class Client extends EventEmitter {
|
|
|
345
362
|
allowedMentions?: AllowedMentions;
|
|
346
363
|
components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
|
|
347
364
|
stickerIds?: Array<snowflake>;
|
|
348
|
-
attachments?: Array<
|
|
365
|
+
attachments?: Array<AttachmentRequest>;
|
|
349
366
|
flags?: MessageFlags;
|
|
350
367
|
files?: Array<FileData>;
|
|
351
368
|
};
|
|
@@ -377,6 +394,8 @@ export declare class Client extends EventEmitter {
|
|
|
377
394
|
deleteChannel(channelId: snowflake, reason?: string): Promise<Channel>;
|
|
378
395
|
/** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
|
|
379
396
|
deleteChannelPermission(channelId: snowflake, overwriteId: snowflake, reason?: string): void;
|
|
397
|
+
/** https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection */
|
|
398
|
+
deleteCurrentUserApplicationRoleConnection(applicationId: snowflake): void;
|
|
380
399
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
381
400
|
deleteGlobalApplicationCommand(applicationId: snowflake, commandId: snowflake): void;
|
|
382
401
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
|
|
@@ -480,6 +499,7 @@ export declare class Client extends EventEmitter {
|
|
|
480
499
|
position?: number | null;
|
|
481
500
|
lockPermissions?: boolean | null;
|
|
482
501
|
parentId?: snowflake | null;
|
|
502
|
+
flags?: ChannelFlags;
|
|
483
503
|
}>): void;
|
|
484
504
|
/** https://discord.com/developers/docs/resources/user#modify-current-user */
|
|
485
505
|
editCurrentUser(options: {
|
|
@@ -524,6 +544,7 @@ export declare class Client extends EventEmitter {
|
|
|
524
544
|
integrationTypes?: Array<ApplicationIntegrationTypes>;
|
|
525
545
|
contexts?: Array<InteractionContextTypes>;
|
|
526
546
|
nsfw?: boolean;
|
|
547
|
+
handler?: EntryPointCommandHandlerTypes;
|
|
527
548
|
}): Promise<ApplicationCommand>;
|
|
528
549
|
/** https://discord.com/developers/docs/resources/guild#modify-guild */
|
|
529
550
|
editGuild(guildId: snowflake, options: {
|
|
@@ -646,7 +667,9 @@ export declare class Client extends EventEmitter {
|
|
|
646
667
|
/** https://discord.com/developers/docs/resources/lobby#modify-lobby */
|
|
647
668
|
editLobby(lobbyId: snowflake, options: {
|
|
648
669
|
metadata?: Record<string, string> | null;
|
|
649
|
-
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags"
|
|
670
|
+
members?: Array<Pick<LobbyMember, "id" | "metadata" | "flags"> & {
|
|
671
|
+
additionalName?: string | null;
|
|
672
|
+
}>;
|
|
650
673
|
idleTimeoutSeconds?: number;
|
|
651
674
|
}): Promise<Lobby>;
|
|
652
675
|
/** https://discord.com/developers/docs/resources/message#edit-message */
|
|
@@ -657,7 +680,7 @@ export declare class Client extends EventEmitter {
|
|
|
657
680
|
allowedMentions?: AllowedMentions | null;
|
|
658
681
|
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
659
682
|
files?: Array<FileData> | null;
|
|
660
|
-
attachments?: Array<
|
|
683
|
+
attachments?: Array<AttachmentRequest> | null;
|
|
661
684
|
}): Promise<Message>;
|
|
662
685
|
/** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */
|
|
663
686
|
editStageInstance(channelId: snowflake, options: {
|
|
@@ -704,7 +727,7 @@ export declare class Client extends EventEmitter {
|
|
|
704
727
|
allowedMentions?: AllowedMentions | null;
|
|
705
728
|
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container> | null;
|
|
706
729
|
files?: Array<FileData> | null;
|
|
707
|
-
attachments?: Array<
|
|
730
|
+
attachments?: Array<AttachmentRequest> | null;
|
|
708
731
|
poll?: PollCreateParams | null;
|
|
709
732
|
threadId?: snowflake;
|
|
710
733
|
withComponents?: boolean;
|
|
@@ -726,7 +749,7 @@ export declare class Client extends EventEmitter {
|
|
|
726
749
|
allowedMentions?: AllowedMentions;
|
|
727
750
|
components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
|
|
728
751
|
files?: Array<FileData>;
|
|
729
|
-
attachments?: Array<
|
|
752
|
+
attachments?: Array<AttachmentRequest>;
|
|
730
753
|
flags?: MessageFlags;
|
|
731
754
|
threadName?: string;
|
|
732
755
|
appliedTags?: Array<snowflake>;
|
|
@@ -974,6 +997,10 @@ export declare class Client extends EventEmitter {
|
|
|
974
997
|
}>;
|
|
975
998
|
/** https://discord.com/developers/docs/resources/lobby#get-lobby */
|
|
976
999
|
getLobby(lobbyId: snowflake): Promise<Lobby>;
|
|
1000
|
+
/** https://docs.discord.com/developers/resources/lobby#get-lobby-messages */
|
|
1001
|
+
getLobbyMessages(lobbyId: snowflake, options?: {
|
|
1002
|
+
limit?: number;
|
|
1003
|
+
}): Promise<Array<LobbyMessage>>;
|
|
977
1004
|
/** https://discord.com/developers/docs/resources/message#get-channel-message */
|
|
978
1005
|
getMessage(channelId: snowflake, messageId: snowflake): Promise<Message>;
|
|
979
1006
|
/** https://discord.com/developers/docs/resources/message#get-reactions */
|
|
@@ -1054,6 +1081,13 @@ export declare class Client extends EventEmitter {
|
|
|
1054
1081
|
}): Promise<Message>;
|
|
1055
1082
|
/** https://discord.com/developers/docs/resources/webhook#get-guild-webhooks */
|
|
1056
1083
|
getWebhooks(guildId: snowflake): Promise<Array<Webhook>>;
|
|
1084
|
+
/** https://docs.discord.com/developers/resources/lobby#create-or-join-lobby */
|
|
1085
|
+
joinLobby(options: {
|
|
1086
|
+
secret: string;
|
|
1087
|
+
idleTimeoutSeconds?: number;
|
|
1088
|
+
lobbyMetadata?: Record<string, string> | null;
|
|
1089
|
+
memberMetadata?: Record<string, string> | null;
|
|
1090
|
+
}): Promise<Lobby>;
|
|
1057
1091
|
/** https://discord.com/developers/docs/resources/channel#join-thread */
|
|
1058
1092
|
joinThread(channelId: snowflake): void;
|
|
1059
1093
|
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
@@ -1126,6 +1160,12 @@ export declare class Client extends EventEmitter {
|
|
|
1126
1160
|
threads?: Array<Channel>;
|
|
1127
1161
|
members?: Array<ThreadMember>;
|
|
1128
1162
|
}>;
|
|
1163
|
+
/** https://docs.discord.com/developers/resources/lobby#send-lobby-message */
|
|
1164
|
+
sendLobbyMessage(lobbyId: snowflake, options: {
|
|
1165
|
+
content: string;
|
|
1166
|
+
metadata?: Record<string, string> | null;
|
|
1167
|
+
flags?: MessageFlags;
|
|
1168
|
+
}): Promise<LobbyMessage>;
|
|
1129
1169
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
1130
1170
|
sendSoundboardSound(channelId: snowflake, options: {
|
|
1131
1171
|
soundId: snowflake;
|
|
@@ -1133,6 +1173,10 @@ export declare class Client extends EventEmitter {
|
|
|
1133
1173
|
}): void;
|
|
1134
1174
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
1135
1175
|
setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
1176
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
1177
|
+
setVoiceChannelStatus(channelId: snowflake, options: {
|
|
1178
|
+
status: string | null;
|
|
1179
|
+
}, reason?: string): void;
|
|
1136
1180
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
1137
1181
|
syncGuildTemplate(guildId: snowflake, code: string): Promise<GuildTemplate>;
|
|
1138
1182
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
@@ -1149,6 +1193,8 @@ export declare class Client extends EventEmitter {
|
|
|
1149
1193
|
}): Promise<ApplicationRoleConnection>;
|
|
1150
1194
|
/** https://discord.com/developers/docs/resources/invite#update-target-users */
|
|
1151
1195
|
updateInviteTargetUser(inviteCode: string, targetUsersFile: FileData): void;
|
|
1196
|
+
/** https://docs.discord.com/developers/resources/lobby#update-lobby-message-moderation-metadata */
|
|
1197
|
+
updateLobbyMessageModerationMetadata(lobbyId: snowflake, messageId: snowflake, metadata: Record<string, string>): void;
|
|
1152
1198
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
1153
1199
|
unpinMessage(channelId: snowflake, messageId: snowflake, reason?: string): void;
|
|
1154
1200
|
}
|
|
@@ -1188,6 +1234,7 @@ export interface ClientEvents {
|
|
|
1188
1234
|
channelCreate: [channel: Channel];
|
|
1189
1235
|
channelUpdate: [channel: Channel];
|
|
1190
1236
|
channelDelete: [channel: Channel];
|
|
1237
|
+
channelInfo: [info: ChannelInfoEvent];
|
|
1191
1238
|
channelPinsUpdate: [pins: ChannelPinsUpdateEvent];
|
|
1192
1239
|
threadCreate: [thread: Channel];
|
|
1193
1240
|
threadUpdate: [thread: Channel];
|
|
@@ -1263,6 +1310,8 @@ export interface ClientEvents {
|
|
|
1263
1310
|
typingStart: [typing: TypingStartEvent];
|
|
1264
1311
|
userUpdate: [user: User];
|
|
1265
1312
|
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEvent];
|
|
1313
|
+
voiceChannelStatusUpdate: [voiceChannel: VoiceChannelStatusUpdateEvent];
|
|
1314
|
+
voiceChannelStartTimeUpdate: [voiceChannel: VoiceChannelStartTimeUpdateEvent];
|
|
1266
1315
|
voiceStateUpdate: [voiceState: VoiceState];
|
|
1267
1316
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEvent];
|
|
1268
1317
|
webhooksUpdate: [channelId: snowflake, guildId: snowflake];
|
package/dist/lib/Client.js
CHANGED
|
@@ -16,6 +16,7 @@ class Client extends node_events_1.default {
|
|
|
16
16
|
largeThreshold;
|
|
17
17
|
presence;
|
|
18
18
|
intents;
|
|
19
|
+
capabilities;
|
|
19
20
|
shardsCount;
|
|
20
21
|
auth;
|
|
21
22
|
reconnect;
|
|
@@ -39,6 +40,7 @@ class Client extends node_events_1.default {
|
|
|
39
40
|
? options.gateway.intents.reduce((sum, num) => sum + num, 0)
|
|
40
41
|
: options.gateway.intents
|
|
41
42
|
: 0;
|
|
43
|
+
this.capabilities = options?.gateway?.capabilities;
|
|
42
44
|
this.shardsCount = options?.shardsCount ?? "auto";
|
|
43
45
|
this.auth = options?.auth ?? "Bot";
|
|
44
46
|
this.reconnect = options?.reconnect ?? true;
|
|
@@ -159,6 +161,13 @@ class Client extends node_events_1.default {
|
|
|
159
161
|
});
|
|
160
162
|
return response.map((c) => transformers_1.ApplicationCommands.applicationCommandFromRaw(c));
|
|
161
163
|
}
|
|
164
|
+
/** https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members */
|
|
165
|
+
async bulkUpdateLobbyMembers(lobbyId, options) {
|
|
166
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbyMembersBulk(lobbyId), {
|
|
167
|
+
json: options,
|
|
168
|
+
});
|
|
169
|
+
return response.map((lobbyMember) => transformers_1.Lobbies.lobbyMemberFromRaw(lobbyMember));
|
|
170
|
+
}
|
|
162
171
|
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
163
172
|
async connect() {
|
|
164
173
|
this.shardsCount =
|
|
@@ -228,6 +237,7 @@ class Client extends node_events_1.default {
|
|
|
228
237
|
default_sort_order: options.defaultSortOrder,
|
|
229
238
|
default_forum_layout: options.defaultForumLayout,
|
|
230
239
|
default_thread_rate_limit_per_user: options.defaultThreadRateLimitPerUser,
|
|
240
|
+
flags: options.flags,
|
|
231
241
|
},
|
|
232
242
|
reason,
|
|
233
243
|
});
|
|
@@ -287,6 +297,7 @@ class Client extends node_events_1.default {
|
|
|
287
297
|
contexts: options.contexts,
|
|
288
298
|
type: options.type,
|
|
289
299
|
nsfw: options.nsfw,
|
|
300
|
+
handler: options.handler,
|
|
290
301
|
},
|
|
291
302
|
});
|
|
292
303
|
return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
|
|
@@ -603,12 +614,27 @@ class Client extends node_events_1.default {
|
|
|
603
614
|
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbies(), {
|
|
604
615
|
json: {
|
|
605
616
|
metadata: options?.metadata,
|
|
606
|
-
members: options?.members
|
|
617
|
+
members: options?.members?.map((member) => ({
|
|
618
|
+
id: member.id,
|
|
619
|
+
metadata: member.metadata,
|
|
620
|
+
flags: member.flags,
|
|
621
|
+
additional_name: member.additionalName,
|
|
622
|
+
})),
|
|
607
623
|
idle_timeout_seconds: options?.idleTimeoutSeconds,
|
|
608
624
|
},
|
|
609
625
|
});
|
|
610
626
|
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
611
627
|
}
|
|
628
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-self */
|
|
629
|
+
async createLobbyChannelSelfInvite(lobbyId) {
|
|
630
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbyChannelInvite(lobbyId));
|
|
631
|
+
return response;
|
|
632
|
+
}
|
|
633
|
+
/** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user */
|
|
634
|
+
async createLobbyChannelUserInvite(lobbyId, userId) {
|
|
635
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbyChannelInvite(lobbyId, userId));
|
|
636
|
+
return response;
|
|
637
|
+
}
|
|
612
638
|
/** https://discord.com/developers/docs/resources/message#create-message */
|
|
613
639
|
async createMessage(channelId, options) {
|
|
614
640
|
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessages(channelId), {
|
|
@@ -637,7 +663,7 @@ class Client extends node_events_1.default {
|
|
|
637
663
|
? transformers_1.Messages.componentsToRaw(options.components)
|
|
638
664
|
: undefined,
|
|
639
665
|
stickers_ids: options.stickersIds,
|
|
640
|
-
attachments: options.attachments,
|
|
666
|
+
attachments: options.attachments?.map((attachment) => transformers_1.Channels.attachmentRequestToRaw(attachment)),
|
|
641
667
|
flags: options.flags,
|
|
642
668
|
enforce_nonce: options.enforceNonce,
|
|
643
669
|
poll: options.poll !== undefined
|
|
@@ -713,7 +739,7 @@ class Client extends node_events_1.default {
|
|
|
713
739
|
}
|
|
714
740
|
: undefined,
|
|
715
741
|
sticker_ids: options.message.stickerIds,
|
|
716
|
-
attachments: options.message.attachments,
|
|
742
|
+
attachments: options.message.attachments?.map((attachment) => transformers_1.Channels.attachmentRequestToRaw(attachment)),
|
|
717
743
|
flags: options.message.flags,
|
|
718
744
|
},
|
|
719
745
|
applied_tags: options.appliedTags,
|
|
@@ -781,6 +807,10 @@ class Client extends node_events_1.default {
|
|
|
781
807
|
reason,
|
|
782
808
|
});
|
|
783
809
|
}
|
|
810
|
+
/** https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection */
|
|
811
|
+
deleteCurrentUserApplicationRoleConnection(applicationId) {
|
|
812
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userApplicationRoleConnection(applicationId));
|
|
813
|
+
}
|
|
784
814
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
785
815
|
deleteGlobalApplicationCommand(applicationId, commandId) {
|
|
786
816
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
|
|
@@ -987,6 +1017,7 @@ class Client extends node_events_1.default {
|
|
|
987
1017
|
position: data.position,
|
|
988
1018
|
lock_permissions: data.lockPermissions,
|
|
989
1019
|
parent_id: data.parentId,
|
|
1020
|
+
flags: data.flags,
|
|
990
1021
|
})),
|
|
991
1022
|
});
|
|
992
1023
|
}
|
|
@@ -1059,6 +1090,7 @@ class Client extends node_events_1.default {
|
|
|
1059
1090
|
integration_types: options.integrationTypes,
|
|
1060
1091
|
contexts: options.contexts,
|
|
1061
1092
|
nsfw: options.nsfw,
|
|
1093
|
+
handler: options.handler,
|
|
1062
1094
|
},
|
|
1063
1095
|
});
|
|
1064
1096
|
return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
|
|
@@ -1310,7 +1342,12 @@ class Client extends node_events_1.default {
|
|
|
1310
1342
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobby(lobbyId), {
|
|
1311
1343
|
json: {
|
|
1312
1344
|
metadata: options.metadata,
|
|
1313
|
-
members: options.members
|
|
1345
|
+
members: options.members?.map((member) => ({
|
|
1346
|
+
id: member.id,
|
|
1347
|
+
metadata: member.metadata,
|
|
1348
|
+
flags: member.flags,
|
|
1349
|
+
additional_name: member.additionalName,
|
|
1350
|
+
})),
|
|
1314
1351
|
idle_timeout_seconds: options.idleTimeoutSeconds,
|
|
1315
1352
|
},
|
|
1316
1353
|
});
|
|
@@ -1339,7 +1376,7 @@ class Client extends node_events_1.default {
|
|
|
1339
1376
|
? transformers_1.Messages.componentsToRaw(options.components)
|
|
1340
1377
|
: null
|
|
1341
1378
|
: undefined,
|
|
1342
|
-
attachments: options.attachments?.map((attachment) => transformers_1.
|
|
1379
|
+
attachments: options.attachments?.map((attachment) => transformers_1.Channels.attachmentRequestToRaw(attachment)),
|
|
1343
1380
|
flags: options.flags,
|
|
1344
1381
|
},
|
|
1345
1382
|
files: options.files,
|
|
@@ -1523,22 +1560,7 @@ class Client extends node_events_1.default {
|
|
|
1523
1560
|
? transformers_1.Messages.componentsToRaw(options.components)
|
|
1524
1561
|
: null
|
|
1525
1562
|
: undefined,
|
|
1526
|
-
attachments: options.attachments?.map((attachment) => (
|
|
1527
|
-
id: attachment.id,
|
|
1528
|
-
filename: attachment.filename,
|
|
1529
|
-
title: attachment.title,
|
|
1530
|
-
description: attachment.description,
|
|
1531
|
-
content_type: attachment.contentType,
|
|
1532
|
-
size: attachment.size,
|
|
1533
|
-
url: attachment.url,
|
|
1534
|
-
proxy_url: attachment.proxyURL,
|
|
1535
|
-
height: attachment.height,
|
|
1536
|
-
width: attachment.width,
|
|
1537
|
-
ephemeral: attachment.ephemeral,
|
|
1538
|
-
duration_secs: attachment.durationSecs,
|
|
1539
|
-
waveform: attachment.waveform,
|
|
1540
|
-
flags: attachment.flags,
|
|
1541
|
-
})),
|
|
1563
|
+
attachments: options.attachments?.map((attachment) => transformers_1.Channels.attachmentRequestToRaw(attachment)),
|
|
1542
1564
|
poll: options.poll !== undefined
|
|
1543
1565
|
? options.poll !== null
|
|
1544
1566
|
? {
|
|
@@ -1599,7 +1621,7 @@ class Client extends node_events_1.default {
|
|
|
1599
1621
|
components: options.components !== undefined
|
|
1600
1622
|
? transformers_1.Messages.componentsToRaw(options.components)
|
|
1601
1623
|
: undefined,
|
|
1602
|
-
attachments: options.attachments,
|
|
1624
|
+
attachments: options.attachments?.map((attachment) => transformers_1.Channels.attachmentRequestToRaw(attachment)),
|
|
1603
1625
|
flags: options.flags,
|
|
1604
1626
|
thread_name: options.threadName,
|
|
1605
1627
|
applied_tags: options.appliedTags,
|
|
@@ -2177,7 +2199,9 @@ class Client extends node_events_1.default {
|
|
|
2177
2199
|
}
|
|
2178
2200
|
/** https://discord.com/developers/docs/resources/invite#get-target-users */
|
|
2179
2201
|
getInviteTargetUser(inviteCode) {
|
|
2180
|
-
return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsers(inviteCode)
|
|
2202
|
+
return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsers(inviteCode), {
|
|
2203
|
+
returnsBlob: true,
|
|
2204
|
+
});
|
|
2181
2205
|
}
|
|
2182
2206
|
async getInviteTargetUserJobStatus(inviteCode) {
|
|
2183
2207
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsersJobStatus(inviteCode));
|
|
@@ -2209,6 +2233,13 @@ class Client extends node_events_1.default {
|
|
|
2209
2233
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.lobby(lobbyId));
|
|
2210
2234
|
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
2211
2235
|
}
|
|
2236
|
+
/** https://docs.discord.com/developers/resources/lobby#get-lobby-messages */
|
|
2237
|
+
async getLobbyMessages(lobbyId, options) {
|
|
2238
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.lobbyMessages(lobbyId), {
|
|
2239
|
+
query: options,
|
|
2240
|
+
});
|
|
2241
|
+
return response.map((lobbyMessage) => transformers_1.Lobbies.lobbyMessageFromRaw(lobbyMessage));
|
|
2242
|
+
}
|
|
2212
2243
|
/** https://discord.com/developers/docs/resources/message#get-channel-message */
|
|
2213
2244
|
async getMessage(channelId, messageId) {
|
|
2214
2245
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessage(channelId, messageId));
|
|
@@ -2389,6 +2420,18 @@ class Client extends node_events_1.default {
|
|
|
2389
2420
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWebhooks(guildId));
|
|
2390
2421
|
return response.map((webhook) => transformers_1.Webhooks.webhookFromRaw(webhook));
|
|
2391
2422
|
}
|
|
2423
|
+
/** https://docs.discord.com/developers/resources/lobby#create-or-join-lobby */
|
|
2424
|
+
async joinLobby(options) {
|
|
2425
|
+
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbies(), {
|
|
2426
|
+
json: {
|
|
2427
|
+
secret: options.secret,
|
|
2428
|
+
idle_timeout_seconds: options.idleTimeoutSeconds,
|
|
2429
|
+
lobby_metadata: options.lobbyMetadata,
|
|
2430
|
+
member_metadata: options.memberMetadata,
|
|
2431
|
+
},
|
|
2432
|
+
});
|
|
2433
|
+
return transformers_1.Lobbies.lobbyFromRaw(response);
|
|
2434
|
+
}
|
|
2392
2435
|
/** https://discord.com/developers/docs/resources/channel#join-thread */
|
|
2393
2436
|
joinThread(channelId) {
|
|
2394
2437
|
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelId));
|
|
@@ -2521,6 +2564,13 @@ class Client extends node_events_1.default {
|
|
|
2521
2564
|
members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
|
|
2522
2565
|
};
|
|
2523
2566
|
}
|
|
2567
|
+
/** https://docs.discord.com/developers/resources/lobby#send-lobby-message */
|
|
2568
|
+
async sendLobbyMessage(lobbyId, options) {
|
|
2569
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbyMessages(lobbyId), {
|
|
2570
|
+
json: options,
|
|
2571
|
+
});
|
|
2572
|
+
return transformers_1.Lobbies.lobbyMessageFromRaw(response);
|
|
2573
|
+
}
|
|
2524
2574
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
2525
2575
|
sendSoundboardSound(channelId, options) {
|
|
2526
2576
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
|
|
@@ -2534,6 +2584,13 @@ class Client extends node_events_1.default {
|
|
|
2534
2584
|
setPresence(options) {
|
|
2535
2585
|
this.shards.forEach((shard) => shard.transmitter.updatePresence(options));
|
|
2536
2586
|
}
|
|
2587
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
2588
|
+
setVoiceChannelStatus(channelId, options, reason) {
|
|
2589
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelVoiceStatus(channelId), {
|
|
2590
|
+
json: options,
|
|
2591
|
+
reason,
|
|
2592
|
+
});
|
|
2593
|
+
}
|
|
2537
2594
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
2538
2595
|
async syncGuildTemplate(guildId, code) {
|
|
2539
2596
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
|
|
@@ -2576,6 +2633,12 @@ class Client extends node_events_1.default {
|
|
|
2576
2633
|
files: [targetUsersFile],
|
|
2577
2634
|
});
|
|
2578
2635
|
}
|
|
2636
|
+
/** https://docs.discord.com/developers/resources/lobby#update-lobby-message-moderation-metadata */
|
|
2637
|
+
updateLobbyMessageModerationMetadata(lobbyId, messageId, metadata) {
|
|
2638
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbyMessageModerationMetadata(lobbyId, messageId), {
|
|
2639
|
+
json: metadata,
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2579
2642
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
2580
2643
|
unpinMessage(channelId, messageId, reason) {
|
|
2581
2644
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPin(channelId, messageId), {
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -274,7 +274,9 @@ export declare enum AuditLogEvents {
|
|
|
274
274
|
OnboardingCreate = 166,
|
|
275
275
|
OnboardingUpdate = 167,
|
|
276
276
|
HomeSettingsCreate = 190,
|
|
277
|
-
HomeSettingsUpdate = 191
|
|
277
|
+
HomeSettingsUpdate = 191,
|
|
278
|
+
VoiceChannelStatusUpdate = 192,
|
|
279
|
+
VoiceChannelStatusDelete = 193
|
|
278
280
|
}
|
|
279
281
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
280
282
|
export declare enum TriggerTypes {
|
|
@@ -327,7 +329,9 @@ export declare enum VideoQualityModes {
|
|
|
327
329
|
export declare enum ChannelFlags {
|
|
328
330
|
Pinned = 2,
|
|
329
331
|
RequiredTag = 16,
|
|
330
|
-
HideMediaDownloadOptions = 32768
|
|
332
|
+
HideMediaDownloadOptions = 32768,
|
|
333
|
+
ChannelObfuscated = 131072,
|
|
334
|
+
IsSpoilerChannel = 2097152
|
|
331
335
|
}
|
|
332
336
|
/** https://discord.com/developers/docs/resources/channel#channel-object-sort-order-types */
|
|
333
337
|
export declare enum SortOrderTypes {
|
|
@@ -585,7 +589,8 @@ export declare enum MessageActivityTypes {
|
|
|
585
589
|
Join = 1,
|
|
586
590
|
Spectate = 2,
|
|
587
591
|
Listen = 3,
|
|
588
|
-
JoinRequest = 5
|
|
592
|
+
JoinRequest = 5,
|
|
593
|
+
StreamRequest = 6
|
|
589
594
|
}
|
|
590
595
|
/** https://discord.com/developers/docs/resources/message#message-object-message-flags */
|
|
591
596
|
export declare enum MessageFlags {
|
|
@@ -767,8 +772,8 @@ export declare enum VisibilityTypes {
|
|
|
767
772
|
/** https://discord.com/developers/docs/resources/subscription#subscription-statuses */
|
|
768
773
|
export declare enum SubscriptionStatuses {
|
|
769
774
|
Active = 0,
|
|
770
|
-
|
|
771
|
-
|
|
775
|
+
Inactive = 1,
|
|
776
|
+
Ending = 2
|
|
772
777
|
}
|
|
773
778
|
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
|
|
774
779
|
export declare enum WebhookTypes {
|
|
@@ -817,6 +822,10 @@ export declare enum StatusTypes {
|
|
|
817
822
|
Invisible = "invisible",
|
|
818
823
|
Offline = "offline"
|
|
819
824
|
}
|
|
825
|
+
/** https://docs.discord.com/developers/events/gateway-events#identify-gateway-capabilities */
|
|
826
|
+
export declare enum GatewayCapabilities {
|
|
827
|
+
ChannelObfuscation = 32768
|
|
828
|
+
}
|
|
820
829
|
/** https://discord.com/developers/docs/topics/gateway-events#receive-events */
|
|
821
830
|
export declare enum GatewayEvents {
|
|
822
831
|
Ready = "READY",
|
|
@@ -830,6 +839,7 @@ export declare enum GatewayEvents {
|
|
|
830
839
|
ChannelCreate = "CHANNEL_CREATE",
|
|
831
840
|
ChannelUpdate = "CHANNEL_UPDATE",
|
|
832
841
|
ChannelDelete = "CHANNEL_DELETE",
|
|
842
|
+
ChannelInfo = "CHANNEL_INFO",
|
|
833
843
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
|
834
844
|
ThreadCreate = "THREAD_CREATE",
|
|
835
845
|
ThreadUpdate = "THREAD_UPDATE",
|
|
@@ -890,6 +900,8 @@ export declare enum GatewayEvents {
|
|
|
890
900
|
TypingStart = "TYPING_START",
|
|
891
901
|
UserUpdate = "USER_UPDATE",
|
|
892
902
|
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
|
903
|
+
VoiceChannelStartTimeUpdate = "VOICE_CHANNEL_START_TIME_UPDATE",
|
|
904
|
+
VoiceChannelStatusUpdate = "VOICE_CHANNEL_STATUS_UPDATE",
|
|
893
905
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
|
894
906
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
|
895
907
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
|
@@ -942,6 +954,7 @@ export declare enum OAuth2Scopes {
|
|
|
942
954
|
GuildsJoin = "guilds.join",
|
|
943
955
|
GuildsMembersRead = "guilds.members.read",
|
|
944
956
|
Identify = "identify",
|
|
957
|
+
IdentifyPremium = "identify.premium",
|
|
945
958
|
MessagesRead = "messages.read",
|
|
946
959
|
RelationShipsRead = "relationships.read",
|
|
947
960
|
RoleConnectionsWrite = "role_connections.write",
|
|
@@ -966,7 +979,8 @@ export declare enum GatewayOPCodes {
|
|
|
966
979
|
InvalidSession = 9,
|
|
967
980
|
Hello = 10,
|
|
968
981
|
HeartbeatACK = 11,
|
|
969
|
-
RequestSoundboardSounds = 31
|
|
982
|
+
RequestSoundboardSounds = 31,
|
|
983
|
+
RequestChannelInfo = 43
|
|
970
984
|
}
|
|
971
985
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
972
986
|
export declare enum GatewayCloseEventCodes {
|
|
@@ -1086,8 +1100,8 @@ export declare enum JSONErrorCodes {
|
|
|
1086
1100
|
OnlyBotsCanUseThisEndpoint = 20002,
|
|
1087
1101
|
ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
|
|
1088
1102
|
NotAuthorizedToPerformThisActionOnThisApplication = 20012,
|
|
1103
|
+
ThisActionRequiresAPremiumSubscription = 20015,
|
|
1089
1104
|
ActionCannotBePerformedDueToSlowmodeRateLimit = 20016,
|
|
1090
|
-
TheMazeIsntMeantForYou = 20017,
|
|
1091
1105
|
OnlyTheOwnerOfThisAccountCanPerformThisAction = 20018,
|
|
1092
1106
|
AnnouncementEditLimitExceeded = 20022,
|
|
1093
1107
|
UnderMinimumAge = 20024,
|
|
@@ -1136,6 +1150,7 @@ export declare enum JSONErrorCodes {
|
|
|
1136
1150
|
RequestEntityTooLarge = 40005,
|
|
1137
1151
|
FeatureTemporarilyDisabledServerSide = 40006,
|
|
1138
1152
|
UserBannedFromThisGuild = 40007,
|
|
1153
|
+
OnlyOneChannelCanHaveAParentIdModifiedAtATime = 40009,
|
|
1139
1154
|
ConnectionHasBeenRevoked = 40012,
|
|
1140
1155
|
OnlyConsumableSKUsCanBeConsumed = 40018,
|
|
1141
1156
|
YouCanOnlyDeleteSandboxEntitlements = 40019,
|
|
@@ -1219,6 +1234,7 @@ export declare enum JSONErrorCodes {
|
|
|
1219
1234
|
VoiceMessagesMustHaveSupportingMetadata = 50161,
|
|
1220
1235
|
VoiceMessagesCannotBeEdited = 50162,
|
|
1221
1236
|
CannotDeleteGuildSubscriptionIntegration = 50163,
|
|
1237
|
+
CannotSendVoiceEffectWhenUserIsServerMutedDeafenedOrSuppressed = 50167,
|
|
1222
1238
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
|
1223
1239
|
TheUserAccountMustFirstBeVerified = 50178,
|
|
1224
1240
|
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
|
@@ -1237,6 +1253,7 @@ export declare enum JSONErrorCodes {
|
|
|
1237
1253
|
ThreadLocked = 160005,
|
|
1238
1254
|
MaximumActiveThreads = 160006,
|
|
1239
1255
|
MaximumActiveAnnouncementThreads = 160007,
|
|
1256
|
+
YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
|
|
1240
1257
|
InvalidJSONForUploadedLottieFile = 170001,
|
|
1241
1258
|
UploadedLottiesCannotContainRasterizedImages = 170002,
|
|
1242
1259
|
StickerMaximumFramerateExceeded = 170003,
|
|
@@ -1253,6 +1270,7 @@ export declare enum JSONErrorCodes {
|
|
|
1253
1270
|
WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
|
|
1254
1271
|
WebhookServicesCannotBeUsedInForumChannels = 220004,
|
|
1255
1272
|
MessageBlockedByHarmfulLinksFilter = 240000,
|
|
1273
|
+
AccessToJoiningNewServersHasBeenLimitedForTheUser = 340015,
|
|
1256
1274
|
CannotEnableOnboardingRequirementsAreNotMet = 350000,
|
|
1257
1275
|
CannotUpdateOnboardingWhileBelowRequirements = 350001,
|
|
1258
1276
|
AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
|
|
@@ -1342,6 +1360,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1342
1360
|
readonly CreateEvents: bigint;
|
|
1343
1361
|
readonly UseExternalSounds: bigint;
|
|
1344
1362
|
readonly SendVoiceMessages: bigint;
|
|
1363
|
+
readonly SetVoiceChannelStatus: bigint;
|
|
1345
1364
|
readonly SendPolls: bigint;
|
|
1346
1365
|
readonly UseExternalApps: bigint;
|
|
1347
1366
|
readonly PinMessages: bigint;
|