disgroove 3.0.1-dev.b082a0c → 3.0.1-dev.c1d6d42
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 +43 -2
- package/dist/lib/Client.js +46 -0
- package/dist/lib/constants.d.ts +62 -3
- package/dist/lib/constants.js +69 -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 +2 -0
- package/dist/lib/rest/Endpoints.js +7 -3
- 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 +2 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/components.d.ts +7 -1
- 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";
|
|
@@ -1092,6 +1092,40 @@ export declare class Client extends EventEmitter {
|
|
|
1092
1092
|
query: string;
|
|
1093
1093
|
limit?: number;
|
|
1094
1094
|
}): Promise<Array<GuildMember>>;
|
|
1095
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
1096
|
+
searchGuildMessages(guildId: snowflake, options?: {
|
|
1097
|
+
limit?: number;
|
|
1098
|
+
offset?: number;
|
|
1099
|
+
maxId?: snowflake;
|
|
1100
|
+
minId?: snowflake;
|
|
1101
|
+
slop?: number;
|
|
1102
|
+
content?: string;
|
|
1103
|
+
channelId?: snowflake;
|
|
1104
|
+
authorType?: Array<AuthorTypes>;
|
|
1105
|
+
authorId?: Array<snowflake>;
|
|
1106
|
+
mentions?: Array<snowflake>;
|
|
1107
|
+
mentionsRolesId?: Array<snowflake>;
|
|
1108
|
+
mentionEveryone?: boolean;
|
|
1109
|
+
repliedToUserId?: Array<snowflake>;
|
|
1110
|
+
repliedToMessageId?: Array<snowflake>;
|
|
1111
|
+
pinned?: boolean;
|
|
1112
|
+
has?: Array<SearchHasTypes>;
|
|
1113
|
+
embedType?: Array<SearchEmbedTypes>;
|
|
1114
|
+
embedProvider?: Array<string>;
|
|
1115
|
+
linkHostname?: Array<string>;
|
|
1116
|
+
attachmentFilename?: Array<string>;
|
|
1117
|
+
attachmentExtension?: Array<string>;
|
|
1118
|
+
sortBy?: SearchSortModes;
|
|
1119
|
+
sortOrder?: string;
|
|
1120
|
+
includeNfsw?: boolean;
|
|
1121
|
+
}): Promise<{
|
|
1122
|
+
doingDeepHistoricalIndex: boolean;
|
|
1123
|
+
documentsIndexed?: number;
|
|
1124
|
+
totalResults: number;
|
|
1125
|
+
messages: Array<Message>;
|
|
1126
|
+
threads?: Array<Channel>;
|
|
1127
|
+
members?: Array<ThreadMember>;
|
|
1128
|
+
}>;
|
|
1095
1129
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
1096
1130
|
sendSoundboardSound(channelId: snowflake, options: {
|
|
1097
1131
|
soundId: snowflake;
|
|
@@ -1099,6 +1133,10 @@ export declare class Client extends EventEmitter {
|
|
|
1099
1133
|
}): void;
|
|
1100
1134
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
1101
1135
|
setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
1136
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
1137
|
+
setVoiceChannelStatus(channelId: snowflake, options: {
|
|
1138
|
+
status: string | null;
|
|
1139
|
+
}, reason?: string): void;
|
|
1102
1140
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
1103
1141
|
syncGuildTemplate(guildId: snowflake, code: string): Promise<GuildTemplate>;
|
|
1104
1142
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
@@ -1154,6 +1192,7 @@ export interface ClientEvents {
|
|
|
1154
1192
|
channelCreate: [channel: Channel];
|
|
1155
1193
|
channelUpdate: [channel: Channel];
|
|
1156
1194
|
channelDelete: [channel: Channel];
|
|
1195
|
+
channelInfo: [info: ChannelInfoEvent];
|
|
1157
1196
|
channelPinsUpdate: [pins: ChannelPinsUpdateEvent];
|
|
1158
1197
|
threadCreate: [thread: Channel];
|
|
1159
1198
|
threadUpdate: [thread: Channel];
|
|
@@ -1229,6 +1268,8 @@ export interface ClientEvents {
|
|
|
1229
1268
|
typingStart: [typing: TypingStartEvent];
|
|
1230
1269
|
userUpdate: [user: User];
|
|
1231
1270
|
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEvent];
|
|
1271
|
+
voiceChannelStatusUpdate: [voiceChannel: VoiceChannelStatusUpdateEvent];
|
|
1272
|
+
voiceChannelStartTimeUpdate: [voiceChannel: VoiceChannelStartTimeUpdateEvent];
|
|
1232
1273
|
voiceStateUpdate: [voiceState: VoiceState];
|
|
1233
1274
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEvent];
|
|
1234
1275
|
webhooksUpdate: [channelId: snowflake, guildId: snowflake];
|
package/dist/lib/Client.js
CHANGED
|
@@ -2482,6 +2482,45 @@ class Client extends node_events_1.default {
|
|
|
2482
2482
|
});
|
|
2483
2483
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
|
2484
2484
|
}
|
|
2485
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
2486
|
+
async searchGuildMessages(guildId, options) {
|
|
2487
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMessagesSearch(guildId), {
|
|
2488
|
+
query: {
|
|
2489
|
+
limit: options?.limit,
|
|
2490
|
+
offset: options?.offset,
|
|
2491
|
+
max_id: options?.maxId,
|
|
2492
|
+
min_id: options?.minId,
|
|
2493
|
+
slop: options?.slop,
|
|
2494
|
+
content: options?.content,
|
|
2495
|
+
channel_id: options?.channelId,
|
|
2496
|
+
author_type: options?.authorType,
|
|
2497
|
+
author_id: options?.authorId,
|
|
2498
|
+
mentions: options?.mentions,
|
|
2499
|
+
mentions_roles_id: options?.mentionsRolesId,
|
|
2500
|
+
mention_everyone: options?.mentionEveryone,
|
|
2501
|
+
replied_to_user_id: options?.repliedToUserId,
|
|
2502
|
+
replied_to_message_id: options?.repliedToMessageId,
|
|
2503
|
+
pinned: options?.pinned,
|
|
2504
|
+
has: options?.has,
|
|
2505
|
+
embed_type: options?.embedType,
|
|
2506
|
+
embed_provider: options?.embedProvider,
|
|
2507
|
+
link_hostname: options?.linkHostname,
|
|
2508
|
+
attachment_filename: options?.attachmentFilename,
|
|
2509
|
+
attachment_extension: options?.attachmentExtension,
|
|
2510
|
+
sort_by: options?.sortBy,
|
|
2511
|
+
sort_order: options?.sortOrder,
|
|
2512
|
+
include_nsfw: options?.includeNfsw,
|
|
2513
|
+
},
|
|
2514
|
+
});
|
|
2515
|
+
return {
|
|
2516
|
+
doingDeepHistoricalIndex: response.doing_deep_historical_index,
|
|
2517
|
+
documentsIndexed: response.documents_indexed,
|
|
2518
|
+
totalResults: response.total_results,
|
|
2519
|
+
messages: response.messages.map((message) => transformers_1.Messages.messageFromRaw(message)),
|
|
2520
|
+
threads: response.threads?.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
|
|
2521
|
+
members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2485
2524
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
2486
2525
|
sendSoundboardSound(channelId, options) {
|
|
2487
2526
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
|
|
@@ -2495,6 +2534,13 @@ class Client extends node_events_1.default {
|
|
|
2495
2534
|
setPresence(options) {
|
|
2496
2535
|
this.shards.forEach((shard) => shard.transmitter.updatePresence(options));
|
|
2497
2536
|
}
|
|
2537
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
2538
|
+
setVoiceChannelStatus(channelId, options, reason) {
|
|
2539
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelVoiceStatus(channelId), {
|
|
2540
|
+
json: options,
|
|
2541
|
+
reason,
|
|
2542
|
+
});
|
|
2543
|
+
}
|
|
2498
2544
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
2499
2545
|
async syncGuildTemplate(guildId, code) {
|
|
2500
2546
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
|
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",
|
|
@@ -918,7 +971,8 @@ export declare enum GatewayOPCodes {
|
|
|
918
971
|
InvalidSession = 9,
|
|
919
972
|
Hello = 10,
|
|
920
973
|
HeartbeatACK = 11,
|
|
921
|
-
RequestSoundboardSounds = 31
|
|
974
|
+
RequestSoundboardSounds = 31,
|
|
975
|
+
RequestChannelInfo = 43
|
|
922
976
|
}
|
|
923
977
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
924
978
|
export declare enum GatewayCloseEventCodes {
|
|
@@ -1174,10 +1228,13 @@ export declare enum JSONErrorCodes {
|
|
|
1174
1228
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
|
1175
1229
|
TheUserAccountMustFirstBeVerified = 50178,
|
|
1176
1230
|
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
|
1231
|
+
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50278,
|
|
1177
1232
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
|
1178
1233
|
TwoFactorAuthenticationIsRequired = 60003,
|
|
1179
1234
|
NoUsersWithDiscordTagExist = 80004,
|
|
1180
1235
|
ReactionWasBlocked = 90001,
|
|
1236
|
+
UserCannotUseBurstReactions = 90002,
|
|
1237
|
+
IndexNotYetAvailable = 110000,
|
|
1181
1238
|
ApplicationNotYetAvailable = 110001,
|
|
1182
1239
|
APIResourceOverloaded = 130000,
|
|
1183
1240
|
TheStageIsAlreadyOpen = 150006,
|
|
@@ -1186,6 +1243,7 @@ export declare enum JSONErrorCodes {
|
|
|
1186
1243
|
ThreadLocked = 160005,
|
|
1187
1244
|
MaximumActiveThreads = 160006,
|
|
1188
1245
|
MaximumActiveAnnouncementThreads = 160007,
|
|
1246
|
+
YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
|
|
1189
1247
|
InvalidJSONForUploadedLottieFile = 170001,
|
|
1190
1248
|
UploadedLottiesCannotContainRasterizedImages = 170002,
|
|
1191
1249
|
StickerMaximumFramerateExceeded = 170003,
|
|
@@ -1291,6 +1349,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1291
1349
|
readonly CreateEvents: bigint;
|
|
1292
1350
|
readonly UseExternalSounds: bigint;
|
|
1293
1351
|
readonly SendVoiceMessages: bigint;
|
|
1352
|
+
readonly SetVoiceChannelStatus: bigint;
|
|
1294
1353
|
readonly SendPolls: bigint;
|
|
1295
1354
|
readonly UseExternalApps: bigint;
|
|
1296
1355
|
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";
|
|
@@ -1006,6 +1067,7 @@ var GatewayOPCodes;
|
|
|
1006
1067
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
|
1007
1068
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
|
1008
1069
|
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
|
1070
|
+
GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
|
|
1009
1071
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
|
1010
1072
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
1011
1073
|
var GatewayCloseEventCodes;
|
|
@@ -1266,10 +1328,13 @@ var JSONErrorCodes;
|
|
|
1266
1328
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1267
1329
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1268
1330
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
1331
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
1269
1332
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
1270
1333
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
1271
1334
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
1272
1335
|
JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
1336
|
+
JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
1337
|
+
JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
1273
1338
|
JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
1274
1339
|
JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
1275
1340
|
JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -1278,6 +1343,7 @@ var JSONErrorCodes;
|
|
|
1278
1343
|
JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
1279
1344
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
1280
1345
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
1346
|
+
JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
|
|
1281
1347
|
JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
1282
1348
|
JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
1283
1349
|
JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -1385,6 +1451,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1385
1451
|
CreateEvents: 1n << 44n,
|
|
1386
1452
|
UseExternalSounds: 1n << 45n,
|
|
1387
1453
|
SendVoiceMessages: 1n << 46n,
|
|
1454
|
+
SetVoiceChannelStatus: 1n << 48n,
|
|
1388
1455
|
SendPolls: 1n << 49n,
|
|
1389
1456
|
UseExternalApps: 1n << 50n,
|
|
1390
1457
|
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";
|
|
@@ -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.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;
|
|
@@ -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,
|
|
@@ -30,7 +30,7 @@ export interface RawApplication {
|
|
|
30
30
|
interactions_endpoint_url?: string;
|
|
31
31
|
role_connections_verification_url?: string;
|
|
32
32
|
event_webhooks_url?: string | null;
|
|
33
|
-
event_webhooks_status
|
|
33
|
+
event_webhooks_status?: ApplicationEventWebhookStatus;
|
|
34
34
|
event_webhooks_types?: Array<string>;
|
|
35
35
|
tags?: Array<string>;
|
|
36
36
|
install_params?: RawInstallParams;
|
|
@@ -88,7 +88,7 @@ export interface Application {
|
|
|
88
88
|
interactionsEndpointURL?: string;
|
|
89
89
|
roleConnectionsVerificationURL?: string;
|
|
90
90
|
eventWebhooksURL?: string | null;
|
|
91
|
-
eventWebhooksStatus
|
|
91
|
+
eventWebhooksStatus?: ApplicationEventWebhookStatus;
|
|
92
92
|
eventWebhooksTypes?: Array<string>;
|
|
93
93
|
tags?: Array<string>;
|
|
94
94
|
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";
|
|
@@ -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 */
|
|
@@ -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