disgroove 3.0.1-dev.6e60c8d → 3.0.1-dev.73d9f92
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 +56 -3
- package/dist/lib/Client.js +74 -1
- package/dist/lib/constants.d.ts +74 -4
- package/dist/lib/constants.js +81 -2
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +24 -1
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +7 -0
- package/dist/lib/rest/Endpoints.d.ts +4 -0
- package/dist/lib/rest/Endpoints.js +11 -3
- package/dist/lib/rest/RequestManager.d.ts +1 -0
- package/dist/lib/rest/RequestManager.js +2 -3
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Components.d.ts +1 -1
- package/dist/lib/transformers/Components.js +8 -0
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Messages.d.ts +1 -1
- package/dist/lib/transformers/Messages.js +78 -20
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +16 -10
- package/dist/lib/types/application.d.ts +4 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/components.d.ts +9 -3
- package/dist/lib/types/gateway-events.d.ts +59 -1
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/message.d.ts +66 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
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, InviteTargetUsersJobStatusErrorCodes } 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 } 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,7 +26,7 @@ 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 } from "./types/message";
|
|
29
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme } 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";
|
|
@@ -131,6 +131,13 @@ export declare class Client extends EventEmitter {
|
|
|
131
131
|
type?: ApplicationCommandTypes;
|
|
132
132
|
nsfw?: boolean;
|
|
133
133
|
}>): Promise<Array<ApplicationCommand>>;
|
|
134
|
+
/** https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members */
|
|
135
|
+
bulkUpdateLobbyMembers(lobbyId: snowflake, options: {
|
|
136
|
+
id: snowflake;
|
|
137
|
+
metadata?: Record<string, string> | null;
|
|
138
|
+
flags?: LobbyMemberFlags;
|
|
139
|
+
removeMember?: boolean;
|
|
140
|
+
}): Promise<Array<LobbyMember>>;
|
|
134
141
|
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
135
142
|
connect(): Promise<void>;
|
|
136
143
|
/** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
|
|
@@ -316,6 +323,7 @@ export declare class Client extends EventEmitter {
|
|
|
316
323
|
flags?: MessageFlags;
|
|
317
324
|
enforceNonce?: boolean;
|
|
318
325
|
poll?: PollCreateParams;
|
|
326
|
+
sharedClientTheme?: SharedClientTheme;
|
|
319
327
|
}): Promise<Message>;
|
|
320
328
|
/** https://discord.com/developers/docs/resources/message#create-reaction */
|
|
321
329
|
createMessageReaction(channelId: snowflake, messageId: snowflake, emoji: string): void;
|
|
@@ -376,6 +384,8 @@ export declare class Client extends EventEmitter {
|
|
|
376
384
|
deleteChannel(channelId: snowflake, reason?: string): Promise<Channel>;
|
|
377
385
|
/** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
|
|
378
386
|
deleteChannelPermission(channelId: snowflake, overwriteId: snowflake, reason?: string): void;
|
|
387
|
+
/** https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection */
|
|
388
|
+
deleteCurrentUserApplicationRoleConnection(applicationId: snowflake): void;
|
|
379
389
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
380
390
|
deleteGlobalApplicationCommand(applicationId: snowflake, commandId: snowflake): void;
|
|
381
391
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
|
|
@@ -1091,6 +1101,40 @@ export declare class Client extends EventEmitter {
|
|
|
1091
1101
|
query: string;
|
|
1092
1102
|
limit?: number;
|
|
1093
1103
|
}): Promise<Array<GuildMember>>;
|
|
1104
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
1105
|
+
searchGuildMessages(guildId: snowflake, options?: {
|
|
1106
|
+
limit?: number;
|
|
1107
|
+
offset?: number;
|
|
1108
|
+
maxId?: snowflake;
|
|
1109
|
+
minId?: snowflake;
|
|
1110
|
+
slop?: number;
|
|
1111
|
+
content?: string;
|
|
1112
|
+
channelId?: snowflake;
|
|
1113
|
+
authorType?: Array<AuthorTypes>;
|
|
1114
|
+
authorId?: Array<snowflake>;
|
|
1115
|
+
mentions?: Array<snowflake>;
|
|
1116
|
+
mentionsRolesId?: Array<snowflake>;
|
|
1117
|
+
mentionEveryone?: boolean;
|
|
1118
|
+
repliedToUserId?: Array<snowflake>;
|
|
1119
|
+
repliedToMessageId?: Array<snowflake>;
|
|
1120
|
+
pinned?: boolean;
|
|
1121
|
+
has?: Array<SearchHasTypes>;
|
|
1122
|
+
embedType?: Array<SearchEmbedTypes>;
|
|
1123
|
+
embedProvider?: Array<string>;
|
|
1124
|
+
linkHostname?: Array<string>;
|
|
1125
|
+
attachmentFilename?: Array<string>;
|
|
1126
|
+
attachmentExtension?: Array<string>;
|
|
1127
|
+
sortBy?: SearchSortModes;
|
|
1128
|
+
sortOrder?: string;
|
|
1129
|
+
includeNfsw?: boolean;
|
|
1130
|
+
}): Promise<{
|
|
1131
|
+
doingDeepHistoricalIndex: boolean;
|
|
1132
|
+
documentsIndexed?: number;
|
|
1133
|
+
totalResults: number;
|
|
1134
|
+
messages: Array<Message>;
|
|
1135
|
+
threads?: Array<Channel>;
|
|
1136
|
+
members?: Array<ThreadMember>;
|
|
1137
|
+
}>;
|
|
1094
1138
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
1095
1139
|
sendSoundboardSound(channelId: snowflake, options: {
|
|
1096
1140
|
soundId: snowflake;
|
|
@@ -1098,6 +1142,10 @@ export declare class Client extends EventEmitter {
|
|
|
1098
1142
|
}): void;
|
|
1099
1143
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
1100
1144
|
setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
1145
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
1146
|
+
setVoiceChannelStatus(channelId: snowflake, options: {
|
|
1147
|
+
status: string | null;
|
|
1148
|
+
}, reason?: string): void;
|
|
1101
1149
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
1102
1150
|
syncGuildTemplate(guildId: snowflake, code: string): Promise<GuildTemplate>;
|
|
1103
1151
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
@@ -1114,6 +1162,8 @@ export declare class Client extends EventEmitter {
|
|
|
1114
1162
|
}): Promise<ApplicationRoleConnection>;
|
|
1115
1163
|
/** https://discord.com/developers/docs/resources/invite#update-target-users */
|
|
1116
1164
|
updateInviteTargetUser(inviteCode: string, targetUsersFile: FileData): void;
|
|
1165
|
+
/** https://docs.discord.com/developers/resources/lobby#update-lobby-message-moderation-metadata */
|
|
1166
|
+
updateLobbyMessageModerationMetadata(lobbyId: snowflake, messageId: snowflake, metadata: Record<string, string>): void;
|
|
1117
1167
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
1118
1168
|
unpinMessage(channelId: snowflake, messageId: snowflake, reason?: string): void;
|
|
1119
1169
|
}
|
|
@@ -1153,6 +1203,7 @@ export interface ClientEvents {
|
|
|
1153
1203
|
channelCreate: [channel: Channel];
|
|
1154
1204
|
channelUpdate: [channel: Channel];
|
|
1155
1205
|
channelDelete: [channel: Channel];
|
|
1206
|
+
channelInfo: [info: ChannelInfoEvent];
|
|
1156
1207
|
channelPinsUpdate: [pins: ChannelPinsUpdateEvent];
|
|
1157
1208
|
threadCreate: [thread: Channel];
|
|
1158
1209
|
threadUpdate: [thread: Channel];
|
|
@@ -1228,6 +1279,8 @@ export interface ClientEvents {
|
|
|
1228
1279
|
typingStart: [typing: TypingStartEvent];
|
|
1229
1280
|
userUpdate: [user: User];
|
|
1230
1281
|
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEvent];
|
|
1282
|
+
voiceChannelStatusUpdate: [voiceChannel: VoiceChannelStatusUpdateEvent];
|
|
1283
|
+
voiceChannelStartTimeUpdate: [voiceChannel: VoiceChannelStartTimeUpdateEvent];
|
|
1231
1284
|
voiceStateUpdate: [voiceState: VoiceState];
|
|
1232
1285
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEvent];
|
|
1233
1286
|
webhooksUpdate: [channelId: snowflake, guildId: snowflake];
|
package/dist/lib/Client.js
CHANGED
|
@@ -159,6 +159,13 @@ class Client extends node_events_1.default {
|
|
|
159
159
|
});
|
|
160
160
|
return response.map((c) => transformers_1.ApplicationCommands.applicationCommandFromRaw(c));
|
|
161
161
|
}
|
|
162
|
+
/** https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members */
|
|
163
|
+
async bulkUpdateLobbyMembers(lobbyId, options) {
|
|
164
|
+
const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbyMembersBulk(lobbyId), {
|
|
165
|
+
json: options,
|
|
166
|
+
});
|
|
167
|
+
return response.map((lobbyMember) => transformers_1.Lobbies.lobbyMemberFromRaw(lobbyMember));
|
|
168
|
+
}
|
|
162
169
|
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
163
170
|
async connect() {
|
|
164
171
|
this.shardsCount =
|
|
@@ -652,6 +659,14 @@ class Client extends node_events_1.default {
|
|
|
652
659
|
layout_type: options.poll.layoutType,
|
|
653
660
|
}
|
|
654
661
|
: undefined,
|
|
662
|
+
shared_client_theme: options.sharedClientTheme !== undefined
|
|
663
|
+
? {
|
|
664
|
+
colors: options.sharedClientTheme.colors,
|
|
665
|
+
gradient_angle: options.sharedClientTheme.gradientAngle,
|
|
666
|
+
base_mix: options.sharedClientTheme.baseMix,
|
|
667
|
+
base_theme: options.sharedClientTheme.baseTheme,
|
|
668
|
+
}
|
|
669
|
+
: undefined,
|
|
655
670
|
},
|
|
656
671
|
files: options.files,
|
|
657
672
|
});
|
|
@@ -773,6 +788,10 @@ class Client extends node_events_1.default {
|
|
|
773
788
|
reason,
|
|
774
789
|
});
|
|
775
790
|
}
|
|
791
|
+
/** https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection */
|
|
792
|
+
deleteCurrentUserApplicationRoleConnection(applicationId) {
|
|
793
|
+
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userApplicationRoleConnection(applicationId));
|
|
794
|
+
}
|
|
776
795
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
777
796
|
deleteGlobalApplicationCommand(applicationId, commandId) {
|
|
778
797
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
|
|
@@ -2169,7 +2188,9 @@ class Client extends node_events_1.default {
|
|
|
2169
2188
|
}
|
|
2170
2189
|
/** https://discord.com/developers/docs/resources/invite#get-target-users */
|
|
2171
2190
|
getInviteTargetUser(inviteCode) {
|
|
2172
|
-
return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsers(inviteCode)
|
|
2191
|
+
return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsers(inviteCode), {
|
|
2192
|
+
returnsBlob: true,
|
|
2193
|
+
});
|
|
2173
2194
|
}
|
|
2174
2195
|
async getInviteTargetUserJobStatus(inviteCode) {
|
|
2175
2196
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.inviteTargetUsersJobStatus(inviteCode));
|
|
@@ -2474,6 +2495,45 @@ class Client extends node_events_1.default {
|
|
|
2474
2495
|
});
|
|
2475
2496
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
|
2476
2497
|
}
|
|
2498
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
2499
|
+
async searchGuildMessages(guildId, options) {
|
|
2500
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMessagesSearch(guildId), {
|
|
2501
|
+
query: {
|
|
2502
|
+
limit: options?.limit,
|
|
2503
|
+
offset: options?.offset,
|
|
2504
|
+
max_id: options?.maxId,
|
|
2505
|
+
min_id: options?.minId,
|
|
2506
|
+
slop: options?.slop,
|
|
2507
|
+
content: options?.content,
|
|
2508
|
+
channel_id: options?.channelId,
|
|
2509
|
+
author_type: options?.authorType,
|
|
2510
|
+
author_id: options?.authorId,
|
|
2511
|
+
mentions: options?.mentions,
|
|
2512
|
+
mentions_roles_id: options?.mentionsRolesId,
|
|
2513
|
+
mention_everyone: options?.mentionEveryone,
|
|
2514
|
+
replied_to_user_id: options?.repliedToUserId,
|
|
2515
|
+
replied_to_message_id: options?.repliedToMessageId,
|
|
2516
|
+
pinned: options?.pinned,
|
|
2517
|
+
has: options?.has,
|
|
2518
|
+
embed_type: options?.embedType,
|
|
2519
|
+
embed_provider: options?.embedProvider,
|
|
2520
|
+
link_hostname: options?.linkHostname,
|
|
2521
|
+
attachment_filename: options?.attachmentFilename,
|
|
2522
|
+
attachment_extension: options?.attachmentExtension,
|
|
2523
|
+
sort_by: options?.sortBy,
|
|
2524
|
+
sort_order: options?.sortOrder,
|
|
2525
|
+
include_nsfw: options?.includeNfsw,
|
|
2526
|
+
},
|
|
2527
|
+
});
|
|
2528
|
+
return {
|
|
2529
|
+
doingDeepHistoricalIndex: response.doing_deep_historical_index,
|
|
2530
|
+
documentsIndexed: response.documents_indexed,
|
|
2531
|
+
totalResults: response.total_results,
|
|
2532
|
+
messages: response.messages.map((message) => transformers_1.Messages.messageFromRaw(message)),
|
|
2533
|
+
threads: response.threads?.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
|
|
2534
|
+
members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2477
2537
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
2478
2538
|
sendSoundboardSound(channelId, options) {
|
|
2479
2539
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
|
|
@@ -2487,6 +2547,13 @@ class Client extends node_events_1.default {
|
|
|
2487
2547
|
setPresence(options) {
|
|
2488
2548
|
this.shards.forEach((shard) => shard.transmitter.updatePresence(options));
|
|
2489
2549
|
}
|
|
2550
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
2551
|
+
setVoiceChannelStatus(channelId, options, reason) {
|
|
2552
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelVoiceStatus(channelId), {
|
|
2553
|
+
json: options,
|
|
2554
|
+
reason,
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2490
2557
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
2491
2558
|
async syncGuildTemplate(guildId, code) {
|
|
2492
2559
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
|
|
@@ -2529,6 +2596,12 @@ class Client extends node_events_1.default {
|
|
|
2529
2596
|
files: [targetUsersFile],
|
|
2530
2597
|
});
|
|
2531
2598
|
}
|
|
2599
|
+
/** https://docs.discord.com/developers/resources/lobby#update-lobby-message-moderation-metadata */
|
|
2600
|
+
updateLobbyMessageModerationMetadata(lobbyId, messageId, metadata) {
|
|
2601
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbyMessageModerationMetadata(lobbyId, messageId), {
|
|
2602
|
+
json: metadata,
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2532
2605
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
2533
2606
|
unpinMessage(channelId, messageId, reason) {
|
|
2534
2607
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPin(channelId, messageId), {
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -162,6 +162,10 @@ export declare enum SeparatorSpacing {
|
|
|
162
162
|
Small = 1,
|
|
163
163
|
Large = 2
|
|
164
164
|
}
|
|
165
|
+
/** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
|
|
166
|
+
export declare enum UnfurledMediaItemFlags {
|
|
167
|
+
IsAnimated = 1
|
|
168
|
+
}
|
|
165
169
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
166
170
|
export declare enum ApplicationIntegrationTypes {
|
|
167
171
|
GuildInstall = 0,
|
|
@@ -270,7 +274,9 @@ export declare enum AuditLogEvents {
|
|
|
270
274
|
OnboardingCreate = 166,
|
|
271
275
|
OnboardingUpdate = 167,
|
|
272
276
|
HomeSettingsCreate = 190,
|
|
273
|
-
HomeSettingsUpdate = 191
|
|
277
|
+
HomeSettingsUpdate = 191,
|
|
278
|
+
VoiceChannelStatusUpdate = 192,
|
|
279
|
+
VoiceChannelStatusDelete = 193
|
|
274
280
|
}
|
|
275
281
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
276
282
|
export declare enum TriggerTypes {
|
|
@@ -614,9 +620,21 @@ export declare enum EmbedTypes {
|
|
|
614
620
|
Link = "link",
|
|
615
621
|
PollResult = "poll_result"
|
|
616
622
|
}
|
|
623
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
|
|
624
|
+
export declare enum EmbedFlags {
|
|
625
|
+
IsContentInventoryEntry = 32
|
|
626
|
+
}
|
|
627
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
|
|
628
|
+
export declare enum EmbedMediaFlags {
|
|
629
|
+
IsAnimated = 32
|
|
630
|
+
}
|
|
617
631
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
|
618
632
|
export declare enum AttachmentFlags {
|
|
619
|
-
|
|
633
|
+
IsClip = 1,
|
|
634
|
+
IsThumbnail = 2,
|
|
635
|
+
IsRemix = 4,
|
|
636
|
+
IsSpoiler = 8,
|
|
637
|
+
IsAnimated = 32
|
|
620
638
|
}
|
|
621
639
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
|
|
622
640
|
export declare enum AllowedMentionTypes {
|
|
@@ -624,6 +642,45 @@ export declare enum AllowedMentionTypes {
|
|
|
624
642
|
UserMentions = "users",
|
|
625
643
|
EveryoneMentions = "everyone"
|
|
626
644
|
}
|
|
645
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
646
|
+
export declare enum BaseThemeTypes {
|
|
647
|
+
Unset = 0,
|
|
648
|
+
Dark = 1,
|
|
649
|
+
Light = 2,
|
|
650
|
+
Darker = 3,
|
|
651
|
+
Midnight = 4
|
|
652
|
+
}
|
|
653
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
|
|
654
|
+
export declare enum AuthorTypes {
|
|
655
|
+
User = "user",
|
|
656
|
+
Bot = "bot",
|
|
657
|
+
Webhook = "webhook"
|
|
658
|
+
}
|
|
659
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
|
|
660
|
+
export declare enum SearchHasTypes {
|
|
661
|
+
Image = "image",
|
|
662
|
+
Sound = "sound",
|
|
663
|
+
Video = "video",
|
|
664
|
+
File = "file",
|
|
665
|
+
Sticker = "sticker",
|
|
666
|
+
Embed = "embed",
|
|
667
|
+
Link = "link",
|
|
668
|
+
Poll = "poll",
|
|
669
|
+
Snapshot = "snapshot"
|
|
670
|
+
}
|
|
671
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
|
|
672
|
+
export declare enum SearchEmbedTypes {
|
|
673
|
+
Image = "image",
|
|
674
|
+
Video = "video",
|
|
675
|
+
GIF = "gif",
|
|
676
|
+
Sound = "sound",
|
|
677
|
+
Article = "article"
|
|
678
|
+
}
|
|
679
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
|
|
680
|
+
export declare enum SearchSortModes {
|
|
681
|
+
Timestamp = "timestamp",
|
|
682
|
+
Relevance = "relevance"
|
|
683
|
+
}
|
|
627
684
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
628
685
|
export declare enum ReactionTypes {
|
|
629
686
|
Normal = 0,
|
|
@@ -775,6 +832,7 @@ export declare enum GatewayEvents {
|
|
|
775
832
|
ChannelCreate = "CHANNEL_CREATE",
|
|
776
833
|
ChannelUpdate = "CHANNEL_UPDATE",
|
|
777
834
|
ChannelDelete = "CHANNEL_DELETE",
|
|
835
|
+
ChannelInfo = "CHANNEL_INFO",
|
|
778
836
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
|
779
837
|
ThreadCreate = "THREAD_CREATE",
|
|
780
838
|
ThreadUpdate = "THREAD_UPDATE",
|
|
@@ -835,6 +893,8 @@ export declare enum GatewayEvents {
|
|
|
835
893
|
TypingStart = "TYPING_START",
|
|
836
894
|
UserUpdate = "USER_UPDATE",
|
|
837
895
|
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
|
896
|
+
VoiceChannelStartTimeUpdate = "VOICE_CHANNEL_START_TIME_UPDATE",
|
|
897
|
+
VoiceChannelStatusUpdate = "VOICE_CHANNEL_STATUS_UPDATE",
|
|
838
898
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
|
839
899
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
|
840
900
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
|
@@ -887,6 +947,7 @@ export declare enum OAuth2Scopes {
|
|
|
887
947
|
GuildsJoin = "guilds.join",
|
|
888
948
|
GuildsMembersRead = "guilds.members.read",
|
|
889
949
|
Identify = "identify",
|
|
950
|
+
IdentifyPremium = "identify.premium",
|
|
890
951
|
MessagesRead = "messages.read",
|
|
891
952
|
RelationShipsRead = "relationships.read",
|
|
892
953
|
RoleConnectionsWrite = "role_connections.write",
|
|
@@ -911,7 +972,8 @@ export declare enum GatewayOPCodes {
|
|
|
911
972
|
InvalidSession = 9,
|
|
912
973
|
Hello = 10,
|
|
913
974
|
HeartbeatACK = 11,
|
|
914
|
-
RequestSoundboardSounds = 31
|
|
975
|
+
RequestSoundboardSounds = 31,
|
|
976
|
+
RequestChannelInfo = 43
|
|
915
977
|
}
|
|
916
978
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
917
979
|
export declare enum GatewayCloseEventCodes {
|
|
@@ -958,7 +1020,10 @@ export declare enum VoiceCloseEventCodes {
|
|
|
958
1020
|
Disconnect = 4014,
|
|
959
1021
|
VoiceServerCrashed = 4015,
|
|
960
1022
|
UnknownEncryptionMode = 4016,
|
|
961
|
-
|
|
1023
|
+
ProtocolRequired = 4017,
|
|
1024
|
+
BadRequest = 4020,
|
|
1025
|
+
RateLimited = 4021,
|
|
1026
|
+
CallTerminated = 4022
|
|
962
1027
|
}
|
|
963
1028
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
964
1029
|
export declare enum HTTPResponseCodes {
|
|
@@ -1164,10 +1229,13 @@ export declare enum JSONErrorCodes {
|
|
|
1164
1229
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
|
1165
1230
|
TheUserAccountMustFirstBeVerified = 50178,
|
|
1166
1231
|
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
|
1232
|
+
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50278,
|
|
1167
1233
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
|
1168
1234
|
TwoFactorAuthenticationIsRequired = 60003,
|
|
1169
1235
|
NoUsersWithDiscordTagExist = 80004,
|
|
1170
1236
|
ReactionWasBlocked = 90001,
|
|
1237
|
+
UserCannotUseBurstReactions = 90002,
|
|
1238
|
+
IndexNotYetAvailable = 110000,
|
|
1171
1239
|
ApplicationNotYetAvailable = 110001,
|
|
1172
1240
|
APIResourceOverloaded = 130000,
|
|
1173
1241
|
TheStageIsAlreadyOpen = 150006,
|
|
@@ -1176,6 +1244,7 @@ export declare enum JSONErrorCodes {
|
|
|
1176
1244
|
ThreadLocked = 160005,
|
|
1177
1245
|
MaximumActiveThreads = 160006,
|
|
1178
1246
|
MaximumActiveAnnouncementThreads = 160007,
|
|
1247
|
+
YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
|
|
1179
1248
|
InvalidJSONForUploadedLottieFile = 170001,
|
|
1180
1249
|
UploadedLottiesCannotContainRasterizedImages = 170002,
|
|
1181
1250
|
StickerMaximumFramerateExceeded = 170003,
|
|
@@ -1281,6 +1350,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1281
1350
|
readonly CreateEvents: bigint;
|
|
1282
1351
|
readonly UseExternalSounds: bigint;
|
|
1283
1352
|
readonly SendVoiceMessages: bigint;
|
|
1353
|
+
readonly SetVoiceChannelStatus: bigint;
|
|
1284
1354
|
readonly SendPolls: bigint;
|
|
1285
1355
|
readonly UseExternalApps: bigint;
|
|
1286
1356
|
readonly PinMessages: bigint;
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
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.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.UnfurledMediaItemFlags = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
|
4
|
+
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.SearchSortModes = exports.SearchEmbedTypes = exports.SearchHasTypes = exports.AuthorTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedMediaFlags = exports.EmbedFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = void 0;
|
|
5
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = void 0;
|
|
5
6
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
7
|
var TimestampStyles;
|
|
7
8
|
(function (TimestampStyles) {
|
|
@@ -181,6 +182,11 @@ var SeparatorSpacing;
|
|
|
181
182
|
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
|
182
183
|
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
|
183
184
|
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
|
185
|
+
/** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
|
|
186
|
+
var UnfurledMediaItemFlags;
|
|
187
|
+
(function (UnfurledMediaItemFlags) {
|
|
188
|
+
UnfurledMediaItemFlags[UnfurledMediaItemFlags["IsAnimated"] = 1] = "IsAnimated";
|
|
189
|
+
})(UnfurledMediaItemFlags || (exports.UnfurledMediaItemFlags = UnfurledMediaItemFlags = {}));
|
|
184
190
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
185
191
|
var ApplicationIntegrationTypes;
|
|
186
192
|
(function (ApplicationIntegrationTypes) {
|
|
@@ -296,6 +302,8 @@ var AuditLogEvents;
|
|
|
296
302
|
AuditLogEvents[AuditLogEvents["OnboardingUpdate"] = 167] = "OnboardingUpdate";
|
|
297
303
|
AuditLogEvents[AuditLogEvents["HomeSettingsCreate"] = 190] = "HomeSettingsCreate";
|
|
298
304
|
AuditLogEvents[AuditLogEvents["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate";
|
|
305
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusUpdate"] = 192] = "VoiceChannelStatusUpdate";
|
|
306
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusDelete"] = 193] = "VoiceChannelStatusDelete";
|
|
299
307
|
})(AuditLogEvents || (exports.AuditLogEvents = AuditLogEvents = {}));
|
|
300
308
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
301
309
|
var TriggerTypes;
|
|
@@ -678,10 +686,24 @@ var EmbedTypes;
|
|
|
678
686
|
EmbedTypes["Link"] = "link";
|
|
679
687
|
EmbedTypes["PollResult"] = "poll_result";
|
|
680
688
|
})(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
|
|
689
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
|
|
690
|
+
var EmbedFlags;
|
|
691
|
+
(function (EmbedFlags) {
|
|
692
|
+
EmbedFlags[EmbedFlags["IsContentInventoryEntry"] = 32] = "IsContentInventoryEntry";
|
|
693
|
+
})(EmbedFlags || (exports.EmbedFlags = EmbedFlags = {}));
|
|
694
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
|
|
695
|
+
var EmbedMediaFlags;
|
|
696
|
+
(function (EmbedMediaFlags) {
|
|
697
|
+
EmbedMediaFlags[EmbedMediaFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
698
|
+
})(EmbedMediaFlags || (exports.EmbedMediaFlags = EmbedMediaFlags = {}));
|
|
681
699
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
|
682
700
|
var AttachmentFlags;
|
|
683
701
|
(function (AttachmentFlags) {
|
|
702
|
+
AttachmentFlags[AttachmentFlags["IsClip"] = 1] = "IsClip";
|
|
703
|
+
AttachmentFlags[AttachmentFlags["IsThumbnail"] = 2] = "IsThumbnail";
|
|
684
704
|
AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
|
|
705
|
+
AttachmentFlags[AttachmentFlags["IsSpoiler"] = 8] = "IsSpoiler";
|
|
706
|
+
AttachmentFlags[AttachmentFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
685
707
|
})(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
|
|
686
708
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
|
|
687
709
|
var AllowedMentionTypes;
|
|
@@ -690,6 +712,50 @@ var AllowedMentionTypes;
|
|
|
690
712
|
AllowedMentionTypes["UserMentions"] = "users";
|
|
691
713
|
AllowedMentionTypes["EveryoneMentions"] = "everyone";
|
|
692
714
|
})(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
|
|
715
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
716
|
+
var BaseThemeTypes;
|
|
717
|
+
(function (BaseThemeTypes) {
|
|
718
|
+
BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
|
|
719
|
+
BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
|
|
720
|
+
BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
|
|
721
|
+
BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
|
|
722
|
+
BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
|
|
723
|
+
})(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
|
|
724
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
|
|
725
|
+
var AuthorTypes;
|
|
726
|
+
(function (AuthorTypes) {
|
|
727
|
+
AuthorTypes["User"] = "user";
|
|
728
|
+
AuthorTypes["Bot"] = "bot";
|
|
729
|
+
AuthorTypes["Webhook"] = "webhook";
|
|
730
|
+
})(AuthorTypes || (exports.AuthorTypes = AuthorTypes = {}));
|
|
731
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
|
|
732
|
+
var SearchHasTypes;
|
|
733
|
+
(function (SearchHasTypes) {
|
|
734
|
+
SearchHasTypes["Image"] = "image";
|
|
735
|
+
SearchHasTypes["Sound"] = "sound";
|
|
736
|
+
SearchHasTypes["Video"] = "video";
|
|
737
|
+
SearchHasTypes["File"] = "file";
|
|
738
|
+
SearchHasTypes["Sticker"] = "sticker";
|
|
739
|
+
SearchHasTypes["Embed"] = "embed";
|
|
740
|
+
SearchHasTypes["Link"] = "link";
|
|
741
|
+
SearchHasTypes["Poll"] = "poll";
|
|
742
|
+
SearchHasTypes["Snapshot"] = "snapshot";
|
|
743
|
+
})(SearchHasTypes || (exports.SearchHasTypes = SearchHasTypes = {}));
|
|
744
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
|
|
745
|
+
var SearchEmbedTypes;
|
|
746
|
+
(function (SearchEmbedTypes) {
|
|
747
|
+
SearchEmbedTypes["Image"] = "image";
|
|
748
|
+
SearchEmbedTypes["Video"] = "video";
|
|
749
|
+
SearchEmbedTypes["GIF"] = "gif";
|
|
750
|
+
SearchEmbedTypes["Sound"] = "sound";
|
|
751
|
+
SearchEmbedTypes["Article"] = "article";
|
|
752
|
+
})(SearchEmbedTypes || (exports.SearchEmbedTypes = SearchEmbedTypes = {}));
|
|
753
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
|
|
754
|
+
var SearchSortModes;
|
|
755
|
+
(function (SearchSortModes) {
|
|
756
|
+
SearchSortModes["Timestamp"] = "timestamp";
|
|
757
|
+
SearchSortModes["Relevance"] = "relevance";
|
|
758
|
+
})(SearchSortModes || (exports.SearchSortModes = SearchSortModes = {}));
|
|
693
759
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
694
760
|
var ReactionTypes;
|
|
695
761
|
(function (ReactionTypes) {
|
|
@@ -856,6 +922,7 @@ var GatewayEvents;
|
|
|
856
922
|
GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
|
857
923
|
GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
|
858
924
|
GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
|
925
|
+
GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
|
|
859
926
|
GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
|
860
927
|
GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
|
|
861
928
|
GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
|
@@ -916,6 +983,8 @@ var GatewayEvents;
|
|
|
916
983
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
|
917
984
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
|
918
985
|
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
|
986
|
+
GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
|
|
987
|
+
GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
|
|
919
988
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
|
920
989
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
|
921
990
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
|
@@ -972,6 +1041,7 @@ var OAuth2Scopes;
|
|
|
972
1041
|
OAuth2Scopes["GuildsJoin"] = "guilds.join";
|
|
973
1042
|
OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
|
|
974
1043
|
OAuth2Scopes["Identify"] = "identify";
|
|
1044
|
+
OAuth2Scopes["IdentifyPremium"] = "identify.premium";
|
|
975
1045
|
OAuth2Scopes["MessagesRead"] = "messages.read";
|
|
976
1046
|
OAuth2Scopes["RelationShipsRead"] = "relationships.read";
|
|
977
1047
|
OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
|
|
@@ -998,6 +1068,7 @@ var GatewayOPCodes;
|
|
|
998
1068
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
|
999
1069
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
|
1000
1070
|
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
|
1071
|
+
GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
|
|
1001
1072
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
|
1002
1073
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
1003
1074
|
var GatewayCloseEventCodes;
|
|
@@ -1047,7 +1118,10 @@ var VoiceCloseEventCodes;
|
|
|
1047
1118
|
VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
|
|
1048
1119
|
VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
|
|
1049
1120
|
VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
|
|
1121
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
|
|
1050
1122
|
VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
|
|
1123
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
|
|
1124
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
|
|
1051
1125
|
})(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
|
|
1052
1126
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
1053
1127
|
var HTTPResponseCodes;
|
|
@@ -1255,10 +1329,13 @@ var JSONErrorCodes;
|
|
|
1255
1329
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1256
1330
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1257
1331
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
1332
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
1258
1333
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
1259
1334
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
1260
1335
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
1261
1336
|
JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
1337
|
+
JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
1338
|
+
JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
1262
1339
|
JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
1263
1340
|
JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
1264
1341
|
JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -1267,6 +1344,7 @@ var JSONErrorCodes;
|
|
|
1267
1344
|
JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
1268
1345
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
1269
1346
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
1347
|
+
JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
|
|
1270
1348
|
JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
1271
1349
|
JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
1272
1350
|
JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -1374,6 +1452,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1374
1452
|
CreateEvents: 1n << 44n,
|
|
1375
1453
|
UseExternalSounds: 1n << 45n,
|
|
1376
1454
|
SendVoiceMessages: 1n << 46n,
|
|
1455
|
+
SetVoiceChannelStatus: 1n << 48n,
|
|
1377
1456
|
SendPolls: 1n << 49n,
|
|
1378
1457
|
UseExternalApps: 1n << 50n,
|
|
1379
1458
|
PinMessages: 1n << 51n,
|
|
@@ -4,7 +4,7 @@ import type { RawAuditLogEntry } from "../types/audit-log";
|
|
|
4
4
|
import type { RawAutoModerationRule } from "../types/auto-moderation";
|
|
5
5
|
import type { RawChannel, RawThreadMember } from "../types/channel";
|
|
6
6
|
import type { RawEntitlement } from "../types/entitlements";
|
|
7
|
-
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent } from "../types/gateway-events";
|
|
7
|
+
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent, RawChannelInfoEvent, RawVoiceChannelStatusUpdateEvent, RawVoiceChannelStartTimeUpdateEvent } from "../types/gateway-events";
|
|
8
8
|
import type { RawGuild, RawUnavailableGuild, RawGuildMember, RawIntegration } from "../types/guild";
|
|
9
9
|
import type { RawGuildScheduledEvent } from "../types/guild-scheduled-event";
|
|
10
10
|
import type { RawInteraction } from "../types/interaction";
|
|
@@ -36,6 +36,7 @@ export interface DispatchEvents {
|
|
|
36
36
|
[GatewayEvents.ChannelCreate]: RawChannel;
|
|
37
37
|
[GatewayEvents.ChannelUpdate]: RawChannel;
|
|
38
38
|
[GatewayEvents.ChannelDelete]: RawChannel;
|
|
39
|
+
[GatewayEvents.ChannelInfo]: RawChannelInfoEvent;
|
|
39
40
|
[GatewayEvents.ChannelPinsUpdate]: RawChannelPinsUpdateEvent;
|
|
40
41
|
[GatewayEvents.ThreadCreate]: RawChannel;
|
|
41
42
|
[GatewayEvents.ThreadUpdate]: RawChannel;
|
|
@@ -96,6 +97,8 @@ export interface DispatchEvents {
|
|
|
96
97
|
[GatewayEvents.TypingStart]: RawTypingStartEvent;
|
|
97
98
|
[GatewayEvents.UserUpdate]: RawUser;
|
|
98
99
|
[GatewayEvents.VoiceChannelEffectSend]: RawVoiceChannelEffectSendEvent;
|
|
100
|
+
[GatewayEvents.VoiceChannelStatusUpdate]: RawVoiceChannelStatusUpdateEvent;
|
|
101
|
+
[GatewayEvents.VoiceChannelStartTimeUpdate]: RawVoiceChannelStartTimeUpdateEvent;
|
|
99
102
|
[GatewayEvents.VoiceStateUpdate]: RawVoiceState;
|
|
100
103
|
[GatewayEvents.VoiceServerUpdate]: RawVoiceServerUpdateEvent;
|
|
101
104
|
[GatewayEvents.WebhooksUpdate]: RawWebhooksUpdateEvent;
|