disgroove 3.0.1-dev.b082a0c → 3.0.1-dev.c03cf79
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 +54 -2
- package/dist/lib/Client.js +63 -0
- package/dist/lib/constants.d.ts +63 -3
- package/dist/lib/constants.js +70 -2
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +18 -0
- 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/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/Messages.d.ts +1 -1
- package/dist/lib/transformers/Messages.js +62 -20
- 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 +56 -0
- package/dist/lib/types/message.d.ts +29 -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";
|
|
@@ -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 */
|
|
@@ -377,6 +384,8 @@ export declare class Client extends EventEmitter {
|
|
|
377
384
|
deleteChannel(channelId: snowflake, reason?: string): Promise<Channel>;
|
|
378
385
|
/** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
|
|
379
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;
|
|
380
389
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
381
390
|
deleteGlobalApplicationCommand(applicationId: snowflake, commandId: snowflake): void;
|
|
382
391
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
|
|
@@ -1092,6 +1101,40 @@ export declare class Client extends EventEmitter {
|
|
|
1092
1101
|
query: string;
|
|
1093
1102
|
limit?: number;
|
|
1094
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
|
+
}>;
|
|
1095
1138
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
1096
1139
|
sendSoundboardSound(channelId: snowflake, options: {
|
|
1097
1140
|
soundId: snowflake;
|
|
@@ -1099,6 +1142,10 @@ export declare class Client extends EventEmitter {
|
|
|
1099
1142
|
}): void;
|
|
1100
1143
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
1101
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;
|
|
1102
1149
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
1103
1150
|
syncGuildTemplate(guildId: snowflake, code: string): Promise<GuildTemplate>;
|
|
1104
1151
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
@@ -1115,6 +1162,8 @@ export declare class Client extends EventEmitter {
|
|
|
1115
1162
|
}): Promise<ApplicationRoleConnection>;
|
|
1116
1163
|
/** https://discord.com/developers/docs/resources/invite#update-target-users */
|
|
1117
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;
|
|
1118
1167
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
1119
1168
|
unpinMessage(channelId: snowflake, messageId: snowflake, reason?: string): void;
|
|
1120
1169
|
}
|
|
@@ -1154,6 +1203,7 @@ export interface ClientEvents {
|
|
|
1154
1203
|
channelCreate: [channel: Channel];
|
|
1155
1204
|
channelUpdate: [channel: Channel];
|
|
1156
1205
|
channelDelete: [channel: Channel];
|
|
1206
|
+
channelInfo: [info: ChannelInfoEvent];
|
|
1157
1207
|
channelPinsUpdate: [pins: ChannelPinsUpdateEvent];
|
|
1158
1208
|
threadCreate: [thread: Channel];
|
|
1159
1209
|
threadUpdate: [thread: Channel];
|
|
@@ -1229,6 +1279,8 @@ export interface ClientEvents {
|
|
|
1229
1279
|
typingStart: [typing: TypingStartEvent];
|
|
1230
1280
|
userUpdate: [user: User];
|
|
1231
1281
|
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEvent];
|
|
1282
|
+
voiceChannelStatusUpdate: [voiceChannel: VoiceChannelStatusUpdateEvent];
|
|
1283
|
+
voiceChannelStartTimeUpdate: [voiceChannel: VoiceChannelStartTimeUpdateEvent];
|
|
1232
1284
|
voiceStateUpdate: [voiceState: VoiceState];
|
|
1233
1285
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEvent];
|
|
1234
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 =
|
|
@@ -781,6 +788,10 @@ class Client extends node_events_1.default {
|
|
|
781
788
|
reason,
|
|
782
789
|
});
|
|
783
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
|
+
}
|
|
784
795
|
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
|
785
796
|
deleteGlobalApplicationCommand(applicationId, commandId) {
|
|
786
797
|
this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
|
|
@@ -2482,6 +2493,45 @@ class Client extends node_events_1.default {
|
|
|
2482
2493
|
});
|
|
2483
2494
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
|
2484
2495
|
}
|
|
2496
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
2497
|
+
async searchGuildMessages(guildId, options) {
|
|
2498
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMessagesSearch(guildId), {
|
|
2499
|
+
query: {
|
|
2500
|
+
limit: options?.limit,
|
|
2501
|
+
offset: options?.offset,
|
|
2502
|
+
max_id: options?.maxId,
|
|
2503
|
+
min_id: options?.minId,
|
|
2504
|
+
slop: options?.slop,
|
|
2505
|
+
content: options?.content,
|
|
2506
|
+
channel_id: options?.channelId,
|
|
2507
|
+
author_type: options?.authorType,
|
|
2508
|
+
author_id: options?.authorId,
|
|
2509
|
+
mentions: options?.mentions,
|
|
2510
|
+
mentions_roles_id: options?.mentionsRolesId,
|
|
2511
|
+
mention_everyone: options?.mentionEveryone,
|
|
2512
|
+
replied_to_user_id: options?.repliedToUserId,
|
|
2513
|
+
replied_to_message_id: options?.repliedToMessageId,
|
|
2514
|
+
pinned: options?.pinned,
|
|
2515
|
+
has: options?.has,
|
|
2516
|
+
embed_type: options?.embedType,
|
|
2517
|
+
embed_provider: options?.embedProvider,
|
|
2518
|
+
link_hostname: options?.linkHostname,
|
|
2519
|
+
attachment_filename: options?.attachmentFilename,
|
|
2520
|
+
attachment_extension: options?.attachmentExtension,
|
|
2521
|
+
sort_by: options?.sortBy,
|
|
2522
|
+
sort_order: options?.sortOrder,
|
|
2523
|
+
include_nsfw: options?.includeNfsw,
|
|
2524
|
+
},
|
|
2525
|
+
});
|
|
2526
|
+
return {
|
|
2527
|
+
doingDeepHistoricalIndex: response.doing_deep_historical_index,
|
|
2528
|
+
documentsIndexed: response.documents_indexed,
|
|
2529
|
+
totalResults: response.total_results,
|
|
2530
|
+
messages: response.messages.map((message) => transformers_1.Messages.messageFromRaw(message)),
|
|
2531
|
+
threads: response.threads?.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
|
|
2532
|
+
members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2485
2535
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
2486
2536
|
sendSoundboardSound(channelId, options) {
|
|
2487
2537
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
|
|
@@ -2495,6 +2545,13 @@ class Client extends node_events_1.default {
|
|
|
2495
2545
|
setPresence(options) {
|
|
2496
2546
|
this.shards.forEach((shard) => shard.transmitter.updatePresence(options));
|
|
2497
2547
|
}
|
|
2548
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
2549
|
+
setVoiceChannelStatus(channelId, options, reason) {
|
|
2550
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelVoiceStatus(channelId), {
|
|
2551
|
+
json: options,
|
|
2552
|
+
reason,
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2498
2555
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
2499
2556
|
async syncGuildTemplate(guildId, code) {
|
|
2500
2557
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
|
|
@@ -2537,6 +2594,12 @@ class Client extends node_events_1.default {
|
|
|
2537
2594
|
files: [targetUsersFile],
|
|
2538
2595
|
});
|
|
2539
2596
|
}
|
|
2597
|
+
/** https://docs.discord.com/developers/resources/lobby#update-lobby-message-moderation-metadata */
|
|
2598
|
+
updateLobbyMessageModerationMetadata(lobbyId, messageId, metadata) {
|
|
2599
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbyMessageModerationMetadata(lobbyId, messageId), {
|
|
2600
|
+
json: metadata,
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2540
2603
|
/** https://discord.com/developers/docs/resources/channel#unpin-message */
|
|
2541
2604
|
unpinMessage(channelId, messageId, reason) {
|
|
2542
2605
|
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 {
|
|
@@ -626,11 +644,43 @@ export declare enum AllowedMentionTypes {
|
|
|
626
644
|
}
|
|
627
645
|
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
628
646
|
export declare enum BaseThemeTypes {
|
|
647
|
+
Unset = 0,
|
|
629
648
|
Dark = 1,
|
|
630
649
|
Light = 2,
|
|
631
650
|
Darker = 3,
|
|
632
651
|
Midnight = 4
|
|
633
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
|
+
}
|
|
634
684
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
635
685
|
export declare enum ReactionTypes {
|
|
636
686
|
Normal = 0,
|
|
@@ -782,6 +832,7 @@ export declare enum GatewayEvents {
|
|
|
782
832
|
ChannelCreate = "CHANNEL_CREATE",
|
|
783
833
|
ChannelUpdate = "CHANNEL_UPDATE",
|
|
784
834
|
ChannelDelete = "CHANNEL_DELETE",
|
|
835
|
+
ChannelInfo = "CHANNEL_INFO",
|
|
785
836
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
|
786
837
|
ThreadCreate = "THREAD_CREATE",
|
|
787
838
|
ThreadUpdate = "THREAD_UPDATE",
|
|
@@ -842,6 +893,8 @@ export declare enum GatewayEvents {
|
|
|
842
893
|
TypingStart = "TYPING_START",
|
|
843
894
|
UserUpdate = "USER_UPDATE",
|
|
844
895
|
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
|
896
|
+
VoiceChannelStartTimeUpdate = "VOICE_CHANNEL_START_TIME_UPDATE",
|
|
897
|
+
VoiceChannelStatusUpdate = "VOICE_CHANNEL_STATUS_UPDATE",
|
|
845
898
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
|
846
899
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
|
847
900
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
|
@@ -894,6 +947,7 @@ export declare enum OAuth2Scopes {
|
|
|
894
947
|
GuildsJoin = "guilds.join",
|
|
895
948
|
GuildsMembersRead = "guilds.members.read",
|
|
896
949
|
Identify = "identify",
|
|
950
|
+
IdentifyPremium = "identify.premium",
|
|
897
951
|
MessagesRead = "messages.read",
|
|
898
952
|
RelationShipsRead = "relationships.read",
|
|
899
953
|
RoleConnectionsWrite = "role_connections.write",
|
|
@@ -918,7 +972,8 @@ export declare enum GatewayOPCodes {
|
|
|
918
972
|
InvalidSession = 9,
|
|
919
973
|
Hello = 10,
|
|
920
974
|
HeartbeatACK = 11,
|
|
921
|
-
RequestSoundboardSounds = 31
|
|
975
|
+
RequestSoundboardSounds = 31,
|
|
976
|
+
RequestChannelInfo = 43
|
|
922
977
|
}
|
|
923
978
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
924
979
|
export declare enum GatewayCloseEventCodes {
|
|
@@ -1174,10 +1229,13 @@ export declare enum JSONErrorCodes {
|
|
|
1174
1229
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
|
1175
1230
|
TheUserAccountMustFirstBeVerified = 50178,
|
|
1176
1231
|
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
|
1232
|
+
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50278,
|
|
1177
1233
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
|
1178
1234
|
TwoFactorAuthenticationIsRequired = 60003,
|
|
1179
1235
|
NoUsersWithDiscordTagExist = 80004,
|
|
1180
1236
|
ReactionWasBlocked = 90001,
|
|
1237
|
+
UserCannotUseBurstReactions = 90002,
|
|
1238
|
+
IndexNotYetAvailable = 110000,
|
|
1181
1239
|
ApplicationNotYetAvailable = 110001,
|
|
1182
1240
|
APIResourceOverloaded = 130000,
|
|
1183
1241
|
TheStageIsAlreadyOpen = 150006,
|
|
@@ -1186,6 +1244,7 @@ export declare enum JSONErrorCodes {
|
|
|
1186
1244
|
ThreadLocked = 160005,
|
|
1187
1245
|
MaximumActiveThreads = 160006,
|
|
1188
1246
|
MaximumActiveAnnouncementThreads = 160007,
|
|
1247
|
+
YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
|
|
1189
1248
|
InvalidJSONForUploadedLottieFile = 170001,
|
|
1190
1249
|
UploadedLottiesCannotContainRasterizedImages = 170002,
|
|
1191
1250
|
StickerMaximumFramerateExceeded = 170003,
|
|
@@ -1291,6 +1350,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1291
1350
|
readonly CreateEvents: bigint;
|
|
1292
1351
|
readonly UseExternalSounds: bigint;
|
|
1293
1352
|
readonly SendVoiceMessages: bigint;
|
|
1353
|
+
readonly SetVoiceChannelStatus: bigint;
|
|
1294
1354
|
readonly SendPolls: bigint;
|
|
1295
1355
|
readonly UseExternalApps: bigint;
|
|
1296
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;
|
|
@@ -693,11 +715,47 @@ var AllowedMentionTypes;
|
|
|
693
715
|
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
694
716
|
var BaseThemeTypes;
|
|
695
717
|
(function (BaseThemeTypes) {
|
|
718
|
+
BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
|
|
696
719
|
BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
|
|
697
720
|
BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
|
|
698
721
|
BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
|
|
699
722
|
BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
|
|
700
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 = {}));
|
|
701
759
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
702
760
|
var ReactionTypes;
|
|
703
761
|
(function (ReactionTypes) {
|
|
@@ -864,6 +922,7 @@ var GatewayEvents;
|
|
|
864
922
|
GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
|
865
923
|
GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
|
866
924
|
GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
|
925
|
+
GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
|
|
867
926
|
GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
|
868
927
|
GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
|
|
869
928
|
GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
|
@@ -924,6 +983,8 @@ var GatewayEvents;
|
|
|
924
983
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
|
925
984
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
|
926
985
|
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
|
986
|
+
GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
|
|
987
|
+
GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
|
|
927
988
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
|
928
989
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
|
929
990
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
|
@@ -980,6 +1041,7 @@ var OAuth2Scopes;
|
|
|
980
1041
|
OAuth2Scopes["GuildsJoin"] = "guilds.join";
|
|
981
1042
|
OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
|
|
982
1043
|
OAuth2Scopes["Identify"] = "identify";
|
|
1044
|
+
OAuth2Scopes["IdentifyPremium"] = "identify.premium";
|
|
983
1045
|
OAuth2Scopes["MessagesRead"] = "messages.read";
|
|
984
1046
|
OAuth2Scopes["RelationShipsRead"] = "relationships.read";
|
|
985
1047
|
OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
|
|
@@ -1006,6 +1068,7 @@ var GatewayOPCodes;
|
|
|
1006
1068
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
|
1007
1069
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
|
1008
1070
|
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
|
1071
|
+
GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
|
|
1009
1072
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
|
1010
1073
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
1011
1074
|
var GatewayCloseEventCodes;
|
|
@@ -1266,10 +1329,13 @@ var JSONErrorCodes;
|
|
|
1266
1329
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1267
1330
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1268
1331
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
1332
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
1269
1333
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
1270
1334
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
1271
1335
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
1272
1336
|
JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
1337
|
+
JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
1338
|
+
JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
1273
1339
|
JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
1274
1340
|
JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
1275
1341
|
JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -1278,6 +1344,7 @@ var JSONErrorCodes;
|
|
|
1278
1344
|
JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
1279
1345
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
1280
1346
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
1347
|
+
JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
|
|
1281
1348
|
JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
1282
1349
|
JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
1283
1350
|
JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -1385,6 +1452,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1385
1452
|
CreateEvents: 1n << 44n,
|
|
1386
1453
|
UseExternalSounds: 1n << 45n,
|
|
1387
1454
|
SendVoiceMessages: 1n << 46n,
|
|
1455
|
+
SetVoiceChannelStatus: 1n << 48n,
|
|
1388
1456
|
SendPolls: 1n << 49n,
|
|
1389
1457
|
UseExternalApps: 1n << 50n,
|
|
1390
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;
|
|
@@ -67,6 +67,14 @@ exports.Handlers = {
|
|
|
67
67
|
[constants_1.GatewayEvents.ChannelCreate]: (shard, data) => shard.client.emit("channelCreate", transformers_1.Channels.channelFromRaw(data)),
|
|
68
68
|
[constants_1.GatewayEvents.ChannelUpdate]: (shard, data) => shard.client.emit("channelUpdate", transformers_1.Channels.channelFromRaw(data)),
|
|
69
69
|
[constants_1.GatewayEvents.ChannelDelete]: (shard, data) => shard.client.emit("channelDelete", transformers_1.Channels.channelFromRaw(data)),
|
|
70
|
+
[constants_1.GatewayEvents.ChannelInfo]: (shard, data) => shard.client.emit("channelInfo", {
|
|
71
|
+
guildId: data.guild_id,
|
|
72
|
+
channels: data.channels.map((channel) => ({
|
|
73
|
+
id: channel.id,
|
|
74
|
+
status: channel.status,
|
|
75
|
+
voiceStartTime: channel.voice_start_time,
|
|
76
|
+
})),
|
|
77
|
+
}),
|
|
70
78
|
[constants_1.GatewayEvents.ChannelPinsUpdate]: (shard, data) => shard.client.emit("channelPinsUpdate", {
|
|
71
79
|
guildId: data.guild_id,
|
|
72
80
|
channelId: data.channel_id,
|
|
@@ -432,6 +440,16 @@ exports.Handlers = {
|
|
|
432
440
|
soundVolume: data.sound_volume,
|
|
433
441
|
});
|
|
434
442
|
},
|
|
443
|
+
[constants_1.GatewayEvents.VoiceChannelStatusUpdate]: (shard, data) => shard.client.emit("voiceChannelStatusUpdate", {
|
|
444
|
+
id: data.id,
|
|
445
|
+
guildId: data.guild_id,
|
|
446
|
+
status: data.status,
|
|
447
|
+
}),
|
|
448
|
+
[constants_1.GatewayEvents.VoiceChannelStartTimeUpdate]: (shard, data) => shard.client.emit("voiceChannelStartTimeUpdate", {
|
|
449
|
+
id: data.id,
|
|
450
|
+
guildId: data.guild_id,
|
|
451
|
+
voiceStartTime: data.voice_start_time,
|
|
452
|
+
}),
|
|
435
453
|
[constants_1.GatewayEvents.VoiceStateUpdate]: (shard, data) => {
|
|
436
454
|
shard.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(data));
|
|
437
455
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from "ws";
|
|
2
2
|
import { GatewayOPCodes } from "../constants";
|
|
3
|
-
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
3
|
+
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestChannelInfo, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
4
4
|
export declare class Transmitter {
|
|
5
5
|
private ws;
|
|
6
6
|
constructor(ws: WebSocket | null);
|
|
@@ -13,6 +13,8 @@ export declare class Transmitter {
|
|
|
13
13
|
requestGuildMembers(options: RequestGuildMembers): void;
|
|
14
14
|
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
15
15
|
requestSoundboardSounds(options: RequestSoundboardSounds): void;
|
|
16
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
17
|
+
requestChannelInfo(options: RequestChannelInfo): void;
|
|
16
18
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
17
19
|
resume(options: Resume): void;
|
|
18
20
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
@@ -56,6 +56,13 @@ class Transmitter {
|
|
|
56
56
|
guild_ids: options.guildIds,
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
60
|
+
requestChannelInfo(options) {
|
|
61
|
+
this.send(constants_1.GatewayOPCodes.RequestChannelInfo, {
|
|
62
|
+
guild_id: options.guildId,
|
|
63
|
+
fields: options.fields
|
|
64
|
+
});
|
|
65
|
+
}
|
|
59
66
|
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
60
67
|
resume(options) {
|
|
61
68
|
this.send(constants_1.GatewayOPCodes.Resume, {
|
|
@@ -22,6 +22,7 @@ export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake,
|
|
|
22
22
|
export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
|
|
23
23
|
export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
|
|
24
24
|
export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
|
|
25
|
+
export declare const guildMessagesSearch: (guildId: snowflake) => `guilds/${string}/messages/search`;
|
|
25
26
|
export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
|
|
26
27
|
export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
|
|
27
28
|
export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
|
|
@@ -66,6 +67,7 @@ export declare const threads: (channelId: snowflake, messageId?: snowflake) => `
|
|
|
66
67
|
export declare const threadMembers: (threadId: snowflake, userId?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
|
67
68
|
export declare const pollAnswerVoters: (channelId: snowflake, messageId: snowflake, answerId: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
|
68
69
|
export declare const pollExpire: (channelId: snowflake, messageId: snowflake) => `channels/${string}/polls/${string}/expire`;
|
|
70
|
+
export declare const channelVoiceStatus: (channelId: snowflake) => `channels/${string}/voice-status`;
|
|
69
71
|
export declare const user: (userId?: snowflake | "@me") => `users/${string}`;
|
|
70
72
|
export declare const userApplicationRoleConnection: (applicationId: snowflake) => `users/@me/applications/${string}/role-connection`;
|
|
71
73
|
export declare const userChannels: () => "users/@me/channels";
|
|
@@ -113,5 +115,7 @@ export declare const lobbies: () => "lobbies";
|
|
|
113
115
|
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
114
116
|
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
115
117
|
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|
|
118
|
+
export declare const lobbyMembersBulk: (lobbyId: snowflake) => `lobbies/${string}/members/bulk`;
|
|
119
|
+
export declare const lobbyMessageModerationMetadata: (lobbyId: snowflake, messageId: snowflake) => `lobbies/${string}/messages/${string}/moderation-metadata`;
|
|
116
120
|
export declare const inviteTargetUsers: (inviteCode: string) => `invites/${string}/target-users`;
|
|
117
121
|
export declare const inviteTargetUsersJobStatus: (inviteCode: string) => `invites/${string}/target-users/job-status`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = void 0;
|
|
3
|
+
exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMessagesSearch = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
|
4
|
+
exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.channelVoiceStatus = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = void 0;
|
|
5
|
+
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyMessageModerationMetadata = exports.lobbyMembersBulk = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = void 0;
|
|
6
6
|
// Guilds
|
|
7
7
|
const guild = (guildId) => `guilds/${guildId}`;
|
|
8
8
|
exports.guild = guild;
|
|
@@ -50,6 +50,8 @@ const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
|
|
|
50
50
|
exports.guildMembersSearch = guildMembersSearch;
|
|
51
51
|
const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
|
|
52
52
|
exports.guildMemberVerification = guildMemberVerification;
|
|
53
|
+
const guildMessagesSearch = (guildId) => `guilds/${guildId}/messages/search`;
|
|
54
|
+
exports.guildMessagesSearch = guildMessagesSearch;
|
|
53
55
|
const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
|
|
54
56
|
exports.guildOnboarding = guildOnboarding;
|
|
55
57
|
const guildPreview = (guildId) => `guilds/${guildId}/preview`;
|
|
@@ -147,6 +149,8 @@ const pollAnswerVoters = (channelId, messageId, answerId) => `channels/${channel
|
|
|
147
149
|
exports.pollAnswerVoters = pollAnswerVoters;
|
|
148
150
|
const pollExpire = (channelId, messageId) => `channels/${channelId}/polls/${messageId}/expire`;
|
|
149
151
|
exports.pollExpire = pollExpire;
|
|
152
|
+
const channelVoiceStatus = (channelId) => `channels/${channelId}/voice-status`;
|
|
153
|
+
exports.channelVoiceStatus = channelVoiceStatus;
|
|
150
154
|
// Users
|
|
151
155
|
const user = (userId = "@me") => `users/${userId}`;
|
|
152
156
|
exports.user = user;
|
|
@@ -253,6 +257,10 @@ const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${u
|
|
|
253
257
|
exports.lobbyMember = lobbyMember;
|
|
254
258
|
const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
|
|
255
259
|
exports.lobbyChannelLinking = lobbyChannelLinking;
|
|
260
|
+
const lobbyMembersBulk = (lobbyId) => `lobbies/${lobbyId}/members/bulk`;
|
|
261
|
+
exports.lobbyMembersBulk = lobbyMembersBulk;
|
|
262
|
+
const lobbyMessageModerationMetadata = (lobbyId, messageId) => `lobbies/${lobbyId}/messages/${messageId}/moderation-metadata`;
|
|
263
|
+
exports.lobbyMessageModerationMetadata = lobbyMessageModerationMetadata;
|
|
256
264
|
// Invites
|
|
257
265
|
const inviteTargetUsers = (inviteCode) => `invites/${inviteCode}/target-users`;
|
|
258
266
|
exports.inviteTargetUsers = inviteTargetUsers;
|
|
@@ -29,6 +29,7 @@ class Applications {
|
|
|
29
29
|
slug: application.slug,
|
|
30
30
|
coverImage: application.cover_image,
|
|
31
31
|
flags: application.flags,
|
|
32
|
+
flagsNew: application.flags_new,
|
|
32
33
|
approximateGuildCount: application.approximate_guild_count,
|
|
33
34
|
approximateUserInstallCount: application.approximate_user_install_count,
|
|
34
35
|
approximateUserAuthorizationCount: application.approximate_user_authorization_count,
|
|
@@ -79,6 +80,7 @@ class Applications {
|
|
|
79
80
|
slug: application.slug,
|
|
80
81
|
cover_image: application.coverImage,
|
|
81
82
|
flags: application.flags,
|
|
83
|
+
flags_new: application.flagsNew,
|
|
82
84
|
approximate_guild_count: application.approximateGuildCount,
|
|
83
85
|
approximate_user_install_count: application.approximateUserInstallCount,
|
|
84
86
|
approximate_user_authorization_count: application.approximateUserAuthorizationCount,
|
|
@@ -34,6 +34,7 @@ class AuditLogs {
|
|
|
34
34
|
roleName: auditLogEntry.options.role_name,
|
|
35
35
|
type: auditLogEntry.options.type,
|
|
36
36
|
integrationType: auditLogEntry.options.integration_type,
|
|
37
|
+
status: auditLogEntry.options.status
|
|
37
38
|
}
|
|
38
39
|
: undefined,
|
|
39
40
|
reason: auditLogEntry.reason,
|
|
@@ -64,6 +65,7 @@ class AuditLogs {
|
|
|
64
65
|
role_name: auditLogEntry.options.roleName,
|
|
65
66
|
type: auditLogEntry.options.type,
|
|
66
67
|
integration_type: auditLogEntry.options.integrationType,
|
|
68
|
+
status: auditLogEntry.options.status
|
|
67
69
|
}
|
|
68
70
|
: undefined,
|
|
69
71
|
reason: auditLogEntry.reason,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
1
|
+
import type { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
2
2
|
export declare class Components {
|
|
3
3
|
static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
|
|
4
4
|
static actionRowToRaw(actionRow: ActionRow): RawActionRow;
|
|
@@ -584,7 +584,11 @@ class Components {
|
|
|
584
584
|
proxyURL: unfurledMediaItem.proxy_url,
|
|
585
585
|
height: unfurledMediaItem.height,
|
|
586
586
|
width: unfurledMediaItem.width,
|
|
587
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
588
|
+
placeholderVersion: unfurledMediaItem.placeholder_version,
|
|
587
589
|
contentType: unfurledMediaItem.content_type,
|
|
590
|
+
flags: unfurledMediaItem.flags,
|
|
591
|
+
attachmentId: unfurledMediaItem.attachment_id,
|
|
588
592
|
};
|
|
589
593
|
}
|
|
590
594
|
static unfurledMediaItemToRaw(unfurledMediaItem) {
|
|
@@ -593,7 +597,11 @@ class Components {
|
|
|
593
597
|
proxy_url: unfurledMediaItem.proxyURL,
|
|
594
598
|
height: unfurledMediaItem.height,
|
|
595
599
|
width: unfurledMediaItem.width,
|
|
600
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
601
|
+
placeholder_version: unfurledMediaItem.placeholderVersion,
|
|
596
602
|
content_type: unfurledMediaItem.contentType,
|
|
603
|
+
flags: unfurledMediaItem.flags,
|
|
604
|
+
attachment_id: unfurledMediaItem.attachmentId,
|
|
597
605
|
};
|
|
598
606
|
}
|
|
599
607
|
static userSelectFromRaw(userSelect) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
1
|
+
import type { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
2
2
|
import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "../types/components";
|
|
3
3
|
export declare class Messages {
|
|
4
4
|
static attachmentFromRaw(attachment: RawAttachment): Attachment;
|
|
@@ -28,6 +28,13 @@ class Messages {
|
|
|
28
28
|
durationSecs: attachment.duration_secs,
|
|
29
29
|
waveform: attachment.waveform,
|
|
30
30
|
flags: attachment.flags,
|
|
31
|
+
clipParticipants: attachment.clip_participants?.map((user) => Users_1.Users.userFromRaw(user)),
|
|
32
|
+
clipCreatedAt: attachment.clip_created_at,
|
|
33
|
+
application: attachment.application !== undefined
|
|
34
|
+
? attachment.application !== null
|
|
35
|
+
? Applications_1.Applications.applicationFromRaw(attachment.application)
|
|
36
|
+
: null
|
|
37
|
+
: undefined,
|
|
31
38
|
};
|
|
32
39
|
}
|
|
33
40
|
static attachmentToRaw(attachment) {
|
|
@@ -46,6 +53,13 @@ class Messages {
|
|
|
46
53
|
duration_secs: attachment.durationSecs,
|
|
47
54
|
waveform: attachment.waveform,
|
|
48
55
|
flags: attachment.flags,
|
|
56
|
+
clip_participants: attachment.clipParticipants?.map((user) => Users_1.Users.userToRaw(user)),
|
|
57
|
+
clip_created_at: attachment.clipCreatedAt,
|
|
58
|
+
application: attachment.application !== undefined
|
|
59
|
+
? attachment.application !== null
|
|
60
|
+
? Applications_1.Applications.applicationToRaw(attachment.application)
|
|
61
|
+
: null
|
|
62
|
+
: undefined,
|
|
49
63
|
};
|
|
50
64
|
}
|
|
51
65
|
static componentsFromRaw(components) {
|
|
@@ -109,6 +123,11 @@ class Messages {
|
|
|
109
123
|
proxyURL: embed.image.proxy_url,
|
|
110
124
|
height: embed.image.height,
|
|
111
125
|
width: embed.image.width,
|
|
126
|
+
contentType: embed.image.content_type,
|
|
127
|
+
placeholder: embed.image.placeholder,
|
|
128
|
+
placeholderVersion: embed.image.placeholder_version,
|
|
129
|
+
description: embed.image.description,
|
|
130
|
+
flags: embed.image.flags,
|
|
112
131
|
}
|
|
113
132
|
: undefined,
|
|
114
133
|
thumbnail: embed.thumbnail !== undefined
|
|
@@ -119,16 +138,25 @@ class Messages {
|
|
|
119
138
|
width: embed.thumbnail.width,
|
|
120
139
|
}
|
|
121
140
|
: undefined,
|
|
122
|
-
video:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
video: embed.video !== undefined
|
|
142
|
+
? {
|
|
143
|
+
url: embed.video.url,
|
|
144
|
+
proxyURL: embed.video.proxy_url,
|
|
145
|
+
height: embed.video.height,
|
|
146
|
+
width: embed.video.width,
|
|
147
|
+
contentType: embed.video.content_type,
|
|
148
|
+
placeholder: embed.video.placeholder,
|
|
149
|
+
placeholderVersion: embed.video.placeholder_version,
|
|
150
|
+
description: embed.video.description,
|
|
151
|
+
flags: embed.video.flags,
|
|
152
|
+
}
|
|
153
|
+
: undefined,
|
|
154
|
+
provider: embed.provider !== undefined
|
|
155
|
+
? {
|
|
156
|
+
name: embed.provider.name,
|
|
157
|
+
url: embed.provider.url,
|
|
158
|
+
}
|
|
159
|
+
: undefined,
|
|
132
160
|
author: embed.author !== undefined
|
|
133
161
|
? {
|
|
134
162
|
name: embed.author.name,
|
|
@@ -161,6 +189,11 @@ class Messages {
|
|
|
161
189
|
proxy_url: embed.image.proxyURL,
|
|
162
190
|
height: embed.image.height,
|
|
163
191
|
width: embed.image.width,
|
|
192
|
+
content_type: embed.image.contentType,
|
|
193
|
+
placeholder: embed.image.placeholder,
|
|
194
|
+
placeholder_version: embed.image.placeholderVersion,
|
|
195
|
+
description: embed.image.description,
|
|
196
|
+
flags: embed.image.flags,
|
|
164
197
|
}
|
|
165
198
|
: undefined,
|
|
166
199
|
thumbnail: embed.thumbnail !== undefined
|
|
@@ -171,16 +204,25 @@ class Messages {
|
|
|
171
204
|
width: embed.thumbnail.width,
|
|
172
205
|
}
|
|
173
206
|
: undefined,
|
|
174
|
-
video:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
207
|
+
video: embed.video !== undefined
|
|
208
|
+
? {
|
|
209
|
+
url: embed.video.url,
|
|
210
|
+
proxy_url: embed.video.proxyURL,
|
|
211
|
+
height: embed.video.height,
|
|
212
|
+
width: embed.video.width,
|
|
213
|
+
content_type: embed.video.contentType,
|
|
214
|
+
placeholder: embed.video.placeholder,
|
|
215
|
+
placeholder_version: embed.video.placeholderVersion,
|
|
216
|
+
description: embed.video.description,
|
|
217
|
+
flags: embed.video.flags,
|
|
218
|
+
}
|
|
219
|
+
: undefined,
|
|
220
|
+
provider: embed.provider !== undefined
|
|
221
|
+
? {
|
|
222
|
+
name: embed.provider.name,
|
|
223
|
+
url: embed.provider.url,
|
|
224
|
+
}
|
|
225
|
+
: undefined,
|
|
184
226
|
author: embed.author !== undefined
|
|
185
227
|
? {
|
|
186
228
|
name: embed.author.name,
|
|
@@ -23,6 +23,7 @@ export interface RawApplication {
|
|
|
23
23
|
slug?: string;
|
|
24
24
|
cover_image?: string;
|
|
25
25
|
flags?: ApplicationFlags;
|
|
26
|
+
flags_new?: string;
|
|
26
27
|
approximate_guild_count?: number;
|
|
27
28
|
approximate_user_install_count?: number;
|
|
28
29
|
approximate_user_authorization_count?: number;
|
|
@@ -30,7 +31,7 @@ export interface RawApplication {
|
|
|
30
31
|
interactions_endpoint_url?: string;
|
|
31
32
|
role_connections_verification_url?: string;
|
|
32
33
|
event_webhooks_url?: string | null;
|
|
33
|
-
event_webhooks_status
|
|
34
|
+
event_webhooks_status?: ApplicationEventWebhookStatus;
|
|
34
35
|
event_webhooks_types?: Array<string>;
|
|
35
36
|
tags?: Array<string>;
|
|
36
37
|
install_params?: RawInstallParams;
|
|
@@ -81,6 +82,7 @@ export interface Application {
|
|
|
81
82
|
slug?: string;
|
|
82
83
|
coverImage?: string;
|
|
83
84
|
flags?: ApplicationFlags;
|
|
85
|
+
flagsNew?: string;
|
|
84
86
|
approximateGuildCount?: number;
|
|
85
87
|
approximateUserInstallCount?: number;
|
|
86
88
|
approximateUserAuthorizationCount?: number;
|
|
@@ -88,7 +90,7 @@ export interface Application {
|
|
|
88
90
|
interactionsEndpointURL?: string;
|
|
89
91
|
roleConnectionsVerificationURL?: string;
|
|
90
92
|
eventWebhooksURL?: string | null;
|
|
91
|
-
eventWebhooksStatus
|
|
93
|
+
eventWebhooksStatus?: ApplicationEventWebhookStatus;
|
|
92
94
|
eventWebhooksTypes?: Array<string>;
|
|
93
95
|
tags?: Array<string>;
|
|
94
96
|
installParams?: InstallParams;
|
|
@@ -42,6 +42,7 @@ export interface RawOptionalAuditLogEntryInfo {
|
|
|
42
42
|
role_name: string;
|
|
43
43
|
type: string;
|
|
44
44
|
integration_type: string;
|
|
45
|
+
status: string;
|
|
45
46
|
}
|
|
46
47
|
/** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
|
|
47
48
|
export interface RawAuditLogChange {
|
|
@@ -84,6 +85,7 @@ export interface OptionalAuditLogEntryInfo {
|
|
|
84
85
|
roleName: string;
|
|
85
86
|
type: string;
|
|
86
87
|
integrationType: string;
|
|
88
|
+
status: string;
|
|
87
89
|
}
|
|
88
90
|
/** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
|
|
89
91
|
export interface AuditLogChange {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles } from "../constants";
|
|
1
|
+
import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles, UnfurledMediaItemFlags } from "../constants";
|
|
2
2
|
import type { snowflake } from "./common";
|
|
3
3
|
import type { RawEmoji, Emoji } from "./emoji";
|
|
4
4
|
import type { RawResolvedData, ResolvedData } from "./interaction";
|
|
@@ -15,7 +15,7 @@ export interface RawButton {
|
|
|
15
15
|
style: ButtonStyles;
|
|
16
16
|
label?: string;
|
|
17
17
|
emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
|
|
18
|
-
custom_id
|
|
18
|
+
custom_id?: string;
|
|
19
19
|
sku_id?: snowflake;
|
|
20
20
|
url?: string;
|
|
21
21
|
disabled?: boolean;
|
|
@@ -252,7 +252,10 @@ export interface RawUnfurledMediaItem {
|
|
|
252
252
|
proxy_url?: string;
|
|
253
253
|
height?: number | null;
|
|
254
254
|
width?: number | null;
|
|
255
|
+
placeholder?: string;
|
|
256
|
+
placeholder_version?: number;
|
|
255
257
|
content_type?: string;
|
|
258
|
+
flags?: UnfurledMediaItemFlags;
|
|
256
259
|
attachment_id?: snowflake;
|
|
257
260
|
}
|
|
258
261
|
/** https://docs.discord.com/developers/components/reference#radio-group-structure */
|
|
@@ -328,7 +331,7 @@ export interface Button {
|
|
|
328
331
|
style: ButtonStyles;
|
|
329
332
|
label?: string;
|
|
330
333
|
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
|
331
|
-
customId
|
|
334
|
+
customId?: string;
|
|
332
335
|
skuId?: snowflake;
|
|
333
336
|
url?: string;
|
|
334
337
|
disabled?: boolean;
|
|
@@ -565,7 +568,10 @@ export interface UnfurledMediaItem {
|
|
|
565
568
|
proxyURL?: string;
|
|
566
569
|
height?: number | null;
|
|
567
570
|
width?: number | null;
|
|
571
|
+
placeholder?: string;
|
|
572
|
+
placeholderVersion?: number;
|
|
568
573
|
contentType?: string;
|
|
574
|
+
flags?: UnfurledMediaItemFlags;
|
|
569
575
|
attachmentId?: snowflake;
|
|
570
576
|
}
|
|
571
577
|
/** https://docs.discord.com/developers/components/reference#radio-group-structure */
|
|
@@ -54,6 +54,11 @@ export interface RawRequestGuildMembers {
|
|
|
54
54
|
export interface RawRequestSoundboardSounds {
|
|
55
55
|
guild_ids: Array<snowflake>;
|
|
56
56
|
}
|
|
57
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
58
|
+
export interface RawRequestChannelInfo {
|
|
59
|
+
guild_id: snowflake;
|
|
60
|
+
fields: Array<string>;
|
|
61
|
+
}
|
|
57
62
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
58
63
|
export interface RawGatewayPresenceUpdate {
|
|
59
64
|
since: number | null;
|
|
@@ -92,6 +97,29 @@ export interface RawAutoModerationActionExecutionEvent {
|
|
|
92
97
|
matched_keyword: string | null;
|
|
93
98
|
matched_content: string | null;
|
|
94
99
|
}
|
|
100
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
101
|
+
export interface RawChannelInfoEvent {
|
|
102
|
+
guild_id: snowflake;
|
|
103
|
+
channels: Array<RawChannelInfoChannel>;
|
|
104
|
+
}
|
|
105
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
106
|
+
export interface RawChannelInfoChannel {
|
|
107
|
+
id: snowflake;
|
|
108
|
+
status?: string | null;
|
|
109
|
+
voice_start_time?: number | null;
|
|
110
|
+
}
|
|
111
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
112
|
+
export interface RawVoiceChannelStatusUpdateEvent {
|
|
113
|
+
id: snowflake;
|
|
114
|
+
guild_id: snowflake;
|
|
115
|
+
status: string | null;
|
|
116
|
+
}
|
|
117
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
118
|
+
export interface RawVoiceChannelStartTimeUpdateEvent {
|
|
119
|
+
id: snowflake;
|
|
120
|
+
guild_id: snowflake;
|
|
121
|
+
voice_start_time?: number | null;
|
|
122
|
+
}
|
|
95
123
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
96
124
|
export interface RawThreadListSyncEvent {
|
|
97
125
|
guild_id: snowflake;
|
|
@@ -495,6 +523,11 @@ export interface RequestGuildMembers {
|
|
|
495
523
|
export interface RequestSoundboardSounds {
|
|
496
524
|
guildIds: Array<snowflake>;
|
|
497
525
|
}
|
|
526
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
|
|
527
|
+
export interface RequestChannelInfo {
|
|
528
|
+
guildId: snowflake;
|
|
529
|
+
fields: Array<string>;
|
|
530
|
+
}
|
|
498
531
|
/** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
|
|
499
532
|
export interface GatewayPresenceUpdate {
|
|
500
533
|
since: number | null;
|
|
@@ -533,6 +566,29 @@ export interface AutoModerationActionExecutionEvent {
|
|
|
533
566
|
matchedKeyword: string | null;
|
|
534
567
|
matchedContent: string | null;
|
|
535
568
|
}
|
|
569
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
570
|
+
export interface ChannelInfoEvent {
|
|
571
|
+
guildId: snowflake;
|
|
572
|
+
channels: Array<RawChannelInfoChannel>;
|
|
573
|
+
}
|
|
574
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
575
|
+
export interface ChannelInfoChannel {
|
|
576
|
+
id: snowflake;
|
|
577
|
+
status?: string | null;
|
|
578
|
+
voiceStartTime?: number | null;
|
|
579
|
+
}
|
|
580
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
|
|
581
|
+
export interface VoiceChannelStatusUpdateEvent {
|
|
582
|
+
id: snowflake;
|
|
583
|
+
guildId: snowflake;
|
|
584
|
+
status: string | null;
|
|
585
|
+
}
|
|
586
|
+
/** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
|
|
587
|
+
export interface VoiceChannelStartTimeUpdateEvent {
|
|
588
|
+
id: snowflake;
|
|
589
|
+
guildId: snowflake;
|
|
590
|
+
voiceStartTime?: number | null;
|
|
591
|
+
}
|
|
536
592
|
/** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
|
|
537
593
|
export interface ThreadListSyncEvent {
|
|
538
594
|
guildId: snowflake;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes } from "../constants";
|
|
1
|
+
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes, EmbedFlags, EmbedMediaFlags } from "../constants";
|
|
2
2
|
import type { Application, RawApplication } from "./application";
|
|
3
3
|
import type { Channel, RawChannel } from "./channel";
|
|
4
4
|
import type { snowflake, timestamp } from "./common";
|
|
@@ -109,6 +109,7 @@ export interface RawEmbed {
|
|
|
109
109
|
provider?: RawEmbedProvider;
|
|
110
110
|
author?: RawEmbedAuthor;
|
|
111
111
|
fields?: Array<RawEmbedField>;
|
|
112
|
+
flags?: EmbedFlags;
|
|
112
113
|
}
|
|
113
114
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
114
115
|
export interface RawEmbedThumbnail {
|
|
@@ -123,6 +124,11 @@ export interface RawEmbedVideo {
|
|
|
123
124
|
proxy_url?: string;
|
|
124
125
|
height?: number;
|
|
125
126
|
width?: number;
|
|
127
|
+
content_type?: string;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
placeholder_version?: number;
|
|
130
|
+
description?: string;
|
|
131
|
+
flags?: EmbedMediaFlags;
|
|
126
132
|
}
|
|
127
133
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
128
134
|
export interface RawEmbedImage {
|
|
@@ -130,6 +136,11 @@ export interface RawEmbedImage {
|
|
|
130
136
|
proxy_url?: string;
|
|
131
137
|
height?: number;
|
|
132
138
|
width?: number;
|
|
139
|
+
content_type?: string;
|
|
140
|
+
placeholder?: string;
|
|
141
|
+
placeholder_version?: number;
|
|
142
|
+
description?: string;
|
|
143
|
+
flags?: EmbedMediaFlags;
|
|
133
144
|
}
|
|
134
145
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
135
146
|
export interface RawEmbedProvider {
|
|
@@ -182,6 +193,9 @@ export interface RawAttachment {
|
|
|
182
193
|
duration_secs?: number;
|
|
183
194
|
waveform?: boolean;
|
|
184
195
|
flags?: AttachmentFlags;
|
|
196
|
+
clip_participants?: Array<RawUser>;
|
|
197
|
+
clip_created_at?: timestamp;
|
|
198
|
+
application?: RawApplication | null;
|
|
185
199
|
}
|
|
186
200
|
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
187
201
|
export interface RawChannelMention {
|
|
@@ -317,6 +331,7 @@ export interface Embed {
|
|
|
317
331
|
provider?: EmbedProvider;
|
|
318
332
|
author?: EmbedAuthor;
|
|
319
333
|
fields?: Array<EmbedField>;
|
|
334
|
+
flags?: EmbedFlags;
|
|
320
335
|
}
|
|
321
336
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
322
337
|
export interface EmbedThumbnail {
|
|
@@ -331,6 +346,11 @@ export interface EmbedVideo {
|
|
|
331
346
|
proxyURL?: string;
|
|
332
347
|
height?: number;
|
|
333
348
|
width?: number;
|
|
349
|
+
contentType?: string;
|
|
350
|
+
placeholder?: string;
|
|
351
|
+
placeholderVersion?: number;
|
|
352
|
+
description?: string;
|
|
353
|
+
flags?: EmbedMediaFlags;
|
|
334
354
|
}
|
|
335
355
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
336
356
|
export interface EmbedImage {
|
|
@@ -338,6 +358,11 @@ export interface EmbedImage {
|
|
|
338
358
|
proxyURL?: string;
|
|
339
359
|
height?: number;
|
|
340
360
|
width?: number;
|
|
361
|
+
contentType?: string;
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
placeholderVersion?: number;
|
|
364
|
+
description?: string;
|
|
365
|
+
flags?: EmbedMediaFlags;
|
|
341
366
|
}
|
|
342
367
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
343
368
|
export interface EmbedProvider {
|
|
@@ -390,6 +415,9 @@ export interface Attachment {
|
|
|
390
415
|
durationSecs?: number;
|
|
391
416
|
waveform?: boolean;
|
|
392
417
|
flags?: AttachmentFlags;
|
|
418
|
+
clipParticipants?: Array<User>;
|
|
419
|
+
clipCreatedAt?: timestamp;
|
|
420
|
+
application?: Application | null;
|
|
393
421
|
}
|
|
394
422
|
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
395
423
|
export interface ChannelMention {
|
package/dist/package.json
CHANGED