seyfert 4.5.0 → 4.6.0
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/lib/api/Routes/guilds.d.ts +12 -1
- package/lib/api/Routes/index.d.ts +3 -1
- package/lib/api/Routes/invites.d.ts +1 -1
- package/lib/api/Routes/oauth2.d.ts +11 -0
- package/lib/api/Routes/oauth2.js +2 -0
- package/lib/api/Routes/skus.d.ts +11 -4
- package/lib/api/Routes/users.d.ts +2 -1
- package/lib/api/Routes/voice.d.ts +4 -0
- package/lib/api/Routes/webhooks.d.ts +1 -1
- package/lib/api/api.d.ts +15 -5
- package/lib/api/api.js +243 -114
- package/lib/api/bucket.js +13 -7
- package/lib/api/shared.d.ts +3 -1
- package/lib/api/utils/constants.d.ts +1 -1
- package/lib/api/utils/constants.js +1 -1
- package/lib/builders/Attachment.d.ts +6 -1
- package/lib/builders/Attachment.js +13 -9
- package/lib/builders/CheckboxGroup.js +1 -1
- package/lib/builders/FileUpload.d.ts +8 -1
- package/lib/builders/FileUpload.js +9 -0
- package/lib/builders/RadioGroup.js +1 -1
- package/lib/client/base.d.ts +3 -3
- package/lib/client/collectors.d.ts +10 -8
- package/lib/client/transformers.d.ts +5 -0
- package/lib/client/workerclient.d.ts +8 -1
- package/lib/client/workerclient.js +28 -9
- package/lib/commands/applications/chat.d.ts +6 -4
- package/lib/commands/applications/options.d.ts +6 -4
- package/lib/commands/applications/shared.d.ts +2 -2
- package/lib/commands/handle.d.ts +7 -3
- package/lib/commands/handle.js +36 -11
- package/lib/commands/handler.js +11 -0
- package/lib/commands/optionresolver.d.ts +6 -7
- package/lib/common/it/error.d.ts +13 -0
- package/lib/common/it/error.js +15 -1
- package/lib/common/it/logger.js +12 -9
- package/lib/common/shorters/application.d.ts +1 -1
- package/lib/common/shorters/application.js +1 -1
- package/lib/common/shorters/bans.js +1 -1
- package/lib/common/shorters/guilds.js +5 -1
- package/lib/common/shorters/interaction.js +7 -4
- package/lib/common/shorters/invites.d.ts +5 -0
- package/lib/common/shorters/members.js +2 -1
- package/lib/common/shorters/messages.js +2 -2
- package/lib/common/shorters/threads.js +1 -1
- package/lib/common/shorters/webhook.js +3 -3
- package/lib/common/types/util.d.ts +7 -0
- package/lib/components/componentcommand.js +2 -2
- package/lib/components/customId.d.ts +3 -0
- package/lib/components/customId.js +11 -0
- package/lib/components/handler.js +2 -3
- package/lib/components/modalcommand.js +2 -2
- package/lib/events/hooks/invite.d.ts +1 -0
- package/lib/events/hooks/presence.d.ts +1 -0
- package/lib/events/hooks/thread.d.ts +1 -0
- package/lib/structures/AnonymousGuild.d.ts +1 -1
- package/lib/structures/AnonymousGuild.js +1 -1
- package/lib/structures/Guild.d.ts +3 -0
- package/lib/structures/GuildMember.d.ts +2 -2
- package/lib/structures/GuildMember.js +22 -4
- package/lib/structures/GuildPreview.d.ts +1 -1
- package/lib/structures/GuildPreview.js +1 -1
- package/lib/structures/GuildRole.d.ts +13 -0
- package/lib/structures/GuildRole.js +21 -0
- package/lib/structures/GuildTemplate.js +1 -1
- package/lib/structures/Interaction.d.ts +7 -7
- package/lib/structures/Interaction.js +35 -21
- package/lib/structures/Message.d.ts +2 -1
- package/lib/structures/channels.d.ts +29 -16
- package/lib/structures/channels.js +59 -19
- package/lib/structures/extra/BaseGuild.d.ts +4 -4
- package/lib/structures/extra/BaseGuild.js +4 -4
- package/lib/types/gateway.d.ts +243 -239
- package/lib/types/index.d.ts +2 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.d.ts +5 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.d.ts +2 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.js +1 -1
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +7 -7
- package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.d.ts +13 -13
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.d.ts +4 -4
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.js +2 -2
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +10 -10
- package/lib/types/payloads/_interactions/applicationCommands.js +4 -4
- package/lib/types/payloads/_interactions/autocomplete.d.ts +2 -2
- package/lib/types/payloads/_interactions/base.d.ts +13 -7
- package/lib/types/payloads/_interactions/modalSubmit.d.ts +4 -4
- package/lib/types/payloads/_interactions/responses.d.ts +10 -10
- package/lib/types/payloads/_interactions/responses.js +2 -2
- package/lib/types/payloads/application.d.ts +21 -15
- package/lib/types/payloads/application.js +7 -7
- package/lib/types/payloads/auditLog.d.ts +22 -17
- package/lib/types/payloads/auditLog.js +7 -2
- package/lib/types/payloads/autoModeration.d.ts +11 -11
- package/lib/types/payloads/autoModeration.js +5 -5
- package/lib/types/payloads/channel.d.ts +87 -78
- package/lib/types/payloads/channel.js +16 -11
- package/lib/types/payloads/components.d.ts +41 -31
- package/lib/types/payloads/components.js +9 -5
- package/lib/types/payloads/emoji.d.ts +2 -2
- package/lib/types/payloads/emoji.js +1 -1
- package/lib/types/payloads/gateway.d.ts +33 -29
- package/lib/types/payloads/gateway.js +5 -5
- package/lib/types/payloads/guild.d.ts +68 -68
- package/lib/types/payloads/guild.js +14 -14
- package/lib/types/payloads/guildScheduledEvent.d.ts +11 -11
- package/lib/types/payloads/guildScheduledEvent.js +3 -3
- package/lib/types/payloads/index.d.ts +2 -2
- package/lib/types/payloads/interactions.d.ts +3 -3
- package/lib/types/payloads/invite.d.ts +11 -11
- package/lib/types/payloads/invite.js +3 -3
- package/lib/types/payloads/monetization.d.ts +4 -4
- package/lib/types/payloads/monetization.js +2 -2
- package/lib/types/payloads/oauth2.d.ts +21 -17
- package/lib/types/payloads/oauth2.js +21 -17
- package/lib/types/payloads/permissions.d.ts +5 -5
- package/lib/types/payloads/permissions.js +2 -2
- package/lib/types/payloads/poll.d.ts +7 -7
- package/lib/types/payloads/poll.js +2 -2
- package/lib/types/payloads/soundboard.d.ts +2 -2
- package/lib/types/payloads/soundboard.js +1 -1
- package/lib/types/payloads/stageInstance.d.ts +5 -5
- package/lib/types/payloads/stageInstance.js +1 -1
- package/lib/types/payloads/sticker.d.ts +8 -8
- package/lib/types/payloads/sticker.js +3 -3
- package/lib/types/payloads/teams.d.ts +8 -8
- package/lib/types/payloads/teams.js +3 -3
- package/lib/types/payloads/template.d.ts +3 -3
- package/lib/types/payloads/template.js +1 -1
- package/lib/types/payloads/user.d.ts +24 -22
- package/lib/types/payloads/user.js +7 -5
- package/lib/types/payloads/voice.d.ts +4 -4
- package/lib/types/payloads/voice.js +1 -1
- package/lib/types/payloads/webhokEvents.d.ts +5 -5
- package/lib/types/payloads/webhokEvents.js +2 -2
- package/lib/types/payloads/webhook.d.ts +4 -4
- package/lib/types/payloads/webhook.js +1 -1
- package/lib/types/rest/application.d.ts +14 -14
- package/lib/types/rest/auditLog.d.ts +1 -1
- package/lib/types/rest/autoModeration.d.ts +7 -7
- package/lib/types/rest/channel.d.ts +79 -74
- package/lib/types/rest/channel.js +1 -1
- package/lib/types/rest/emoji.d.ts +8 -8
- package/lib/types/rest/gateway.d.ts +2 -2
- package/lib/types/rest/guild.d.ts +98 -98
- package/lib/types/rest/guild.js +5 -5
- package/lib/types/rest/guildScheduledEvent.d.ts +11 -11
- package/lib/types/rest/index.d.ts +34 -3
- package/lib/types/rest/index.js +33 -2
- package/lib/types/rest/interactions.d.ts +48 -48
- package/lib/types/rest/invite.d.ts +5 -5
- package/lib/types/rest/monetization.d.ts +9 -9
- package/lib/types/rest/monetization.js +1 -1
- package/lib/types/rest/oauth2.d.ts +22 -18
- package/lib/types/rest/poll.d.ts +4 -4
- package/lib/types/rest/soundboard.d.ts +8 -8
- package/lib/types/rest/stageInstance.d.ts +6 -6
- package/lib/types/rest/sticker.d.ts +10 -10
- package/lib/types/rest/template.d.ts +11 -11
- package/lib/types/rest/user.d.ts +18 -14
- package/lib/types/rest/voice.d.ts +5 -5
- package/lib/types/rest/webhook.d.ts +38 -38
- package/lib/types/utils/index.d.ts +19 -19
- package/lib/types/utils/index.js +19 -19
- package/lib/websocket/SharedTypes.d.ts +2 -2
- package/lib/websocket/constants/index.js +2 -2
- package/lib/websocket/discord/heartbeater.d.ts +1 -0
- package/lib/websocket/discord/heartbeater.js +8 -0
- package/lib/websocket/discord/shard.d.ts +19 -10
- package/lib/websocket/discord/shard.js +254 -121
- package/lib/websocket/discord/sharder.d.ts +2 -2
- package/lib/websocket/discord/sharder.js +1 -1
- package/lib/websocket/discord/shared.d.ts +7 -2
- package/lib/websocket/discord/workermanager.d.ts +3 -1
- package/lib/websocket/discord/workermanager.js +31 -24
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Types extracted from https://discord.com/developers/
|
|
2
|
+
* Types extracted from https://docs.discord.com/developers/resources/channel
|
|
3
3
|
*/
|
|
4
4
|
import type { PickRequired } from '../../common';
|
|
5
5
|
import type { APITopLevelComponent, ChannelFlags, ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '../index';
|
|
@@ -22,7 +22,7 @@ export interface APIPartialChannel {
|
|
|
22
22
|
/**
|
|
23
23
|
* The type of the channel
|
|
24
24
|
*
|
|
25
|
-
* See https://discord.com/developers/
|
|
25
|
+
* See https://docs.discord.com/developers/resources/channel#channel-object-channel-types
|
|
26
26
|
*/
|
|
27
27
|
type: ChannelType;
|
|
28
28
|
/**
|
|
@@ -37,6 +37,10 @@ export interface APIPartialChannel {
|
|
|
37
37
|
export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel {
|
|
38
38
|
type: T;
|
|
39
39
|
flags?: ChannelFlags;
|
|
40
|
+
/**
|
|
41
|
+
* Application id associated with the channel
|
|
42
|
+
*/
|
|
43
|
+
application_id?: Snowflake | null;
|
|
40
44
|
}
|
|
41
45
|
export type TextChannelType = ChannelType.AnnouncementThread | ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.GuildStageVoice | ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.PrivateThread | ChannelType.PublicThread;
|
|
42
46
|
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
|
@@ -73,7 +77,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
|
|
|
73
77
|
/**
|
|
74
78
|
* Explicit permission overwrites for members and roles
|
|
75
79
|
*
|
|
76
|
-
* See https://discord.com/developers/
|
|
80
|
+
* See https://docs.discord.com/developers/resources/channel#overwrite-object
|
|
77
81
|
*/
|
|
78
82
|
permission_overwrites?: APIOverwrite[];
|
|
79
83
|
/**
|
|
@@ -128,13 +132,13 @@ export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChan
|
|
|
128
132
|
/**
|
|
129
133
|
* Voice region id for the voice or stage channel, automatic when set to `null`
|
|
130
134
|
*
|
|
131
|
-
* See https://discord.com/developers/
|
|
135
|
+
* See https://docs.discord.com/developers/resources/voice#voice-region-object
|
|
132
136
|
*/
|
|
133
137
|
rtc_region?: string | null;
|
|
134
138
|
/**
|
|
135
139
|
* The camera video quality mode of the voice or stage channel, `1` when not present
|
|
136
140
|
*
|
|
137
|
-
* See https://discord.com/developers/
|
|
141
|
+
* See https://docs.discord.com/developers/resources/channel#channel-object-video-quality-modes
|
|
138
142
|
*/
|
|
139
143
|
video_quality_mode?: VideoQualityMode;
|
|
140
144
|
}
|
|
@@ -144,7 +148,7 @@ export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBas
|
|
|
144
148
|
/**
|
|
145
149
|
* The recipients of the DM
|
|
146
150
|
*
|
|
147
|
-
* See https://discord.com/developers/
|
|
151
|
+
* See https://docs.discord.com/developers/resources/user#user-object
|
|
148
152
|
*/
|
|
149
153
|
recipients?: APIUser[];
|
|
150
154
|
}
|
|
@@ -216,7 +220,7 @@ export interface APIThreadChannel extends Omit<APITextBasedChannel<ThreadChannel
|
|
|
216
220
|
applied_tags: Snowflake[];
|
|
217
221
|
}
|
|
218
222
|
/**
|
|
219
|
-
* https://discord.com/developers/
|
|
223
|
+
* https://docs.discord.com/developers/resources/channel#forum-tag-object-forum-tag-structure
|
|
220
224
|
*/
|
|
221
225
|
export interface APIGuildForumTag {
|
|
222
226
|
/**
|
|
@@ -241,7 +245,7 @@ export interface APIGuildForumTag {
|
|
|
241
245
|
emoji_name: string | null;
|
|
242
246
|
}
|
|
243
247
|
/**
|
|
244
|
-
* https://discord.com/developers/
|
|
248
|
+
* https://docs.discord.com/developers/resources/channel#default-reaction-object-default-reaction-structure
|
|
245
249
|
*/
|
|
246
250
|
export interface APIGuildForumDefaultReactionEmoji {
|
|
247
251
|
/**
|
|
@@ -254,7 +258,7 @@ export interface APIGuildForumDefaultReactionEmoji {
|
|
|
254
258
|
emoji_name: string | null;
|
|
255
259
|
}
|
|
256
260
|
/**
|
|
257
|
-
* https://discord.com/developers/
|
|
261
|
+
* https://docs.discord.com/developers/resources/channel/#channel-object-sort-order-types
|
|
258
262
|
*/
|
|
259
263
|
export declare enum SortOrderType {
|
|
260
264
|
/**
|
|
@@ -267,7 +271,7 @@ export declare enum SortOrderType {
|
|
|
267
271
|
CreationDate = 1
|
|
268
272
|
}
|
|
269
273
|
/**
|
|
270
|
-
* https://discord.com/developers/
|
|
274
|
+
* https://docs.discord.com/developers/resources/channel/#channel-object-forum-layout-types
|
|
271
275
|
*/
|
|
272
276
|
export declare enum ForumLayoutType {
|
|
273
277
|
/**
|
|
@@ -334,11 +338,11 @@ export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.G
|
|
|
334
338
|
}
|
|
335
339
|
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
|
|
336
340
|
/**
|
|
337
|
-
* https://discord.com/developers/
|
|
341
|
+
* https://docs.discord.com/developers/resources/channel#channel-object-channel-structure
|
|
338
342
|
*/
|
|
339
343
|
export type APIChannel = APIDMChannel | APIGroupDMChannel | APIGuildCategoryChannel | APIGuildForumChannel | APIGuildMediaChannel | APIGuildStageVoiceChannel | APIGuildVoiceChannel | APINewsChannel | APITextChannel | APIThreadChannel;
|
|
340
344
|
/**
|
|
341
|
-
* https://discord.com/developers/
|
|
345
|
+
* https://docs.discord.com/developers/resources/channel#message-object-message-structure
|
|
342
346
|
*/
|
|
343
347
|
export interface APIMessage {
|
|
344
348
|
/**
|
|
@@ -355,7 +359,7 @@ export interface APIMessage {
|
|
|
355
359
|
* If the message is generated by a webhook, the author object corresponds to the webhook's id,
|
|
356
360
|
* username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property
|
|
357
361
|
*
|
|
358
|
-
* See https://discord.com/developers/
|
|
362
|
+
* See https://docs.discord.com/developers/resources/user#user-object
|
|
359
363
|
*/
|
|
360
364
|
author: APIUser;
|
|
361
365
|
/**
|
|
@@ -391,14 +395,14 @@ export interface APIMessage {
|
|
|
391
395
|
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
|
392
396
|
* from text-based guild channels
|
|
393
397
|
*
|
|
394
|
-
* See https://discord.com/developers/
|
|
395
|
-
* See https://discord.com/developers/
|
|
398
|
+
* See https://docs.discord.com/developers/resources/user#user-object
|
|
399
|
+
* See https://docs.discord.com/developers/resources/guild#guild-member-object
|
|
396
400
|
*/
|
|
397
401
|
mentions: APIUser[];
|
|
398
402
|
/**
|
|
399
403
|
* Roles specifically mentioned in this message
|
|
400
404
|
*
|
|
401
|
-
* See https://discord.com/developers/
|
|
405
|
+
* See https://docs.discord.com/developers/topics/permissions#role-object
|
|
402
406
|
*/
|
|
403
407
|
mention_roles: APIRole['id'][];
|
|
404
408
|
/**
|
|
@@ -410,13 +414,13 @@ export interface APIMessage {
|
|
|
410
414
|
*
|
|
411
415
|
* If no mentions in the message meet these requirements, this field will not be sent
|
|
412
416
|
*
|
|
413
|
-
* See https://discord.com/developers/
|
|
417
|
+
* See https://docs.discord.com/developers/resources/channel#channel-mention-object
|
|
414
418
|
*/
|
|
415
419
|
mention_channels?: APIChannelMention[];
|
|
416
420
|
/**
|
|
417
421
|
* Any attached files
|
|
418
422
|
*
|
|
419
|
-
* See https://discord.com/developers/
|
|
423
|
+
* See https://docs.discord.com/developers/resources/channel#attachment-object
|
|
420
424
|
*
|
|
421
425
|
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
|
422
426
|
*
|
|
@@ -429,7 +433,7 @@ export interface APIMessage {
|
|
|
429
433
|
/**
|
|
430
434
|
* Any embedded content
|
|
431
435
|
*
|
|
432
|
-
* See https://discord.com/developers/
|
|
436
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object
|
|
433
437
|
*
|
|
434
438
|
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
|
435
439
|
*
|
|
@@ -442,7 +446,7 @@ export interface APIMessage {
|
|
|
442
446
|
/**
|
|
443
447
|
* Reactions to the message
|
|
444
448
|
*
|
|
445
|
-
* See https://discord.com/developers/
|
|
449
|
+
* See https://docs.discord.com/developers/resources/channel#reaction-object
|
|
446
450
|
*/
|
|
447
451
|
reactions?: APIReaction[];
|
|
448
452
|
/**
|
|
@@ -463,19 +467,19 @@ export interface APIMessage {
|
|
|
463
467
|
/**
|
|
464
468
|
* Type of message
|
|
465
469
|
*
|
|
466
|
-
* See https://discord.com/developers/
|
|
470
|
+
* See https://docs.discord.com/developers/resources/channel#message-object-message-types
|
|
467
471
|
*/
|
|
468
472
|
type: MessageType;
|
|
469
473
|
/**
|
|
470
474
|
* Sent with Rich Presence-related chat embeds
|
|
471
475
|
*
|
|
472
|
-
* See https://discord.com/developers/
|
|
476
|
+
* See https://docs.discord.com/developers/resources/channel#message-object-message-activity-structure
|
|
473
477
|
*/
|
|
474
478
|
activity?: APIMessageActivity;
|
|
475
479
|
/**
|
|
476
480
|
* Sent with Rich Presence-related chat embeds
|
|
477
481
|
*
|
|
478
|
-
* See https://discord.com/developers/
|
|
482
|
+
* See https://docs.discord.com/developers/resources/application#application-object
|
|
479
483
|
*/
|
|
480
484
|
application?: Partial<APIApplication>;
|
|
481
485
|
/**
|
|
@@ -485,13 +489,13 @@ export interface APIMessage {
|
|
|
485
489
|
/**
|
|
486
490
|
* Reference data sent with crossposted messages, replies, pins, and thread starter messages
|
|
487
491
|
*
|
|
488
|
-
* See https://discord.com/developers/
|
|
492
|
+
* See https://docs.discord.com/developers/resources/channel#message-reference-object-message-reference-structure
|
|
489
493
|
*/
|
|
490
494
|
message_reference?: APIMessageReference;
|
|
491
495
|
/**
|
|
492
496
|
* Message flags combined as a bitfield
|
|
493
497
|
*
|
|
494
|
-
* See https://discord.com/developers/
|
|
498
|
+
* See https://docs.discord.com/developers/resources/channel#message-object-message-flags
|
|
495
499
|
*
|
|
496
500
|
* See https://en.wikipedia.org/wiki/Bit_field
|
|
497
501
|
*/
|
|
@@ -507,7 +511,7 @@ export interface APIMessage {
|
|
|
507
511
|
*
|
|
508
512
|
* If the field exists but is `null`, the referenced message was deleted
|
|
509
513
|
*
|
|
510
|
-
* See https://discord.com/developers/
|
|
514
|
+
* See https://docs.discord.com/developers/resources/channel#message-object
|
|
511
515
|
*/
|
|
512
516
|
referenced_message?: APIMessage | null;
|
|
513
517
|
/**
|
|
@@ -534,7 +538,7 @@ export interface APIMessage {
|
|
|
534
538
|
/**
|
|
535
539
|
* Sent if the message contains stickers
|
|
536
540
|
*
|
|
537
|
-
* See https://discord.com/developers/
|
|
541
|
+
* See https://docs.discord.com/developers/resources/sticker#sticker-item-object
|
|
538
542
|
*/
|
|
539
543
|
sticker_items?: APIStickerItem[];
|
|
540
544
|
/**
|
|
@@ -550,7 +554,7 @@ export interface APIMessage {
|
|
|
550
554
|
/**
|
|
551
555
|
* Data for users, members, channels, and roles in the message's auto-populated select menus
|
|
552
556
|
*
|
|
553
|
-
* See https://discord.com/developers/
|
|
557
|
+
* See https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
|
554
558
|
*/
|
|
555
559
|
resolved?: APIInteractionDataResolved;
|
|
556
560
|
/**
|
|
@@ -574,7 +578,7 @@ export interface APIMessage {
|
|
|
574
578
|
call?: APIMessageCall;
|
|
575
579
|
}
|
|
576
580
|
/**
|
|
577
|
-
* https://discord.com/developers/
|
|
581
|
+
* https://docs.discord.com/developers/resources/channel#message-object-message-types
|
|
578
582
|
*/
|
|
579
583
|
export declare enum MessageType {
|
|
580
584
|
Default = 0,
|
|
@@ -620,24 +624,24 @@ export declare enum MessageType {
|
|
|
620
624
|
PollResult = 46
|
|
621
625
|
}
|
|
622
626
|
/**
|
|
623
|
-
* https://discord.com/developers/
|
|
627
|
+
* https://docs.discord.com/developers/resources/channel#message-object-message-activity-structure
|
|
624
628
|
*/
|
|
625
629
|
export interface APIMessageActivity {
|
|
626
630
|
/**
|
|
627
631
|
* Type of message activity
|
|
628
632
|
*
|
|
629
|
-
* See https://discord.com/developers/
|
|
633
|
+
* See https://docs.discord.com/developers/resources/channel#message-object-message-activity-types
|
|
630
634
|
*/
|
|
631
635
|
type: MessageActivityType;
|
|
632
636
|
/**
|
|
633
637
|
* `party_id` from a Rich Presence event
|
|
634
638
|
*
|
|
635
|
-
* See https://discord.com/developers/
|
|
639
|
+
* See https://docs.discord.com/developers/rich-presence/how-to#updating-presence-update-presence-payload-fields
|
|
636
640
|
*/
|
|
637
641
|
party_id?: string;
|
|
638
642
|
}
|
|
639
643
|
/**
|
|
640
|
-
* https://discord.com/developers/
|
|
644
|
+
* https://docs.discord.com/developers/resources/channel#message-reference-types
|
|
641
645
|
*/
|
|
642
646
|
export declare enum MessageReferenceType {
|
|
643
647
|
/**
|
|
@@ -650,7 +654,7 @@ export declare enum MessageReferenceType {
|
|
|
650
654
|
Forward = 1
|
|
651
655
|
}
|
|
652
656
|
/**
|
|
653
|
-
* https://discord.com/developers/
|
|
657
|
+
* https://docs.discord.com/developers/resources/channel#message-reference-object-message-reference-structure
|
|
654
658
|
*/
|
|
655
659
|
export interface APIMessageReference {
|
|
656
660
|
/**
|
|
@@ -671,7 +675,7 @@ export interface APIMessageReference {
|
|
|
671
675
|
type?: MessageReferenceType;
|
|
672
676
|
}
|
|
673
677
|
/**
|
|
674
|
-
* https://discord.com/developers/
|
|
678
|
+
* https://docs.discord.com/developers/resources/channel#message-snapshot-object
|
|
675
679
|
*/
|
|
676
680
|
export interface APIMessageSnapshot {
|
|
677
681
|
/**
|
|
@@ -681,16 +685,17 @@ export interface APIMessageSnapshot {
|
|
|
681
685
|
}
|
|
682
686
|
export type APIMessageSnapshotFields = Pick<APIMessage, 'attachments' | 'content' | 'edited_timestamp' | 'embeds' | 'flags' | 'mention_roles' | 'mentions' | 'timestamp' | 'type' | 'sticker_items' | 'components'>;
|
|
683
687
|
/**
|
|
684
|
-
* https://discord.com/developers/
|
|
688
|
+
* https://docs.discord.com/developers/resources/channel#message-object-message-activity-types
|
|
685
689
|
*/
|
|
686
690
|
export declare enum MessageActivityType {
|
|
687
691
|
Join = 1,
|
|
688
692
|
Spectate = 2,
|
|
689
693
|
Listen = 3,
|
|
690
|
-
JoinRequest = 5
|
|
694
|
+
JoinRequest = 5,
|
|
695
|
+
StreamRequest = 6
|
|
691
696
|
}
|
|
692
697
|
/**
|
|
693
|
-
* https://discord.com/developers/
|
|
698
|
+
* https://docs.discord.com/developers/resources/channel#message-object-message-flags
|
|
694
699
|
*/
|
|
695
700
|
export declare enum MessageFlags {
|
|
696
701
|
/**
|
|
@@ -751,7 +756,7 @@ export declare enum MessageFlags {
|
|
|
751
756
|
IsComponentsV2 = 32768
|
|
752
757
|
}
|
|
753
758
|
/**
|
|
754
|
-
* https://discord.com/developers/
|
|
759
|
+
* https://docs.discord.com/developers/resources/channel#message-call-object-message-call-object-structure
|
|
755
760
|
*/
|
|
756
761
|
export interface APIMessageCall {
|
|
757
762
|
/**
|
|
@@ -783,14 +788,14 @@ export interface APIMessageSharedClientTheme {
|
|
|
783
788
|
base_theme?: BaseThemeType | null;
|
|
784
789
|
}
|
|
785
790
|
/**
|
|
786
|
-
* https://discord.com/developers/
|
|
791
|
+
* https://docs.discord.com/developers/resources/message#message-pin-object
|
|
787
792
|
*/
|
|
788
793
|
export interface APIMessagePin {
|
|
789
794
|
pinned_at: string;
|
|
790
795
|
message: APIMessage;
|
|
791
796
|
}
|
|
792
797
|
/**
|
|
793
|
-
* https://discord.com/developers/
|
|
798
|
+
* https://docs.discord.com/developers/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
|
|
794
799
|
*/
|
|
795
800
|
export interface APIMessageRoleSubscriptionData {
|
|
796
801
|
/**
|
|
@@ -811,7 +816,7 @@ export interface APIMessageRoleSubscriptionData {
|
|
|
811
816
|
is_renewal: boolean;
|
|
812
817
|
}
|
|
813
818
|
/**
|
|
814
|
-
* https://discord.com/developers/
|
|
819
|
+
* https://docs.discord.com/developers/resources/channel#followed-channel-object
|
|
815
820
|
*/
|
|
816
821
|
export interface APIFollowedChannel {
|
|
817
822
|
/**
|
|
@@ -824,7 +829,7 @@ export interface APIFollowedChannel {
|
|
|
824
829
|
webhook_id: Snowflake;
|
|
825
830
|
}
|
|
826
831
|
/**
|
|
827
|
-
* https://discord.com/developers/
|
|
832
|
+
* https://docs.discord.com/developers/resources/channel#reaction-object-reaction-structure
|
|
828
833
|
*/
|
|
829
834
|
export interface APIReaction {
|
|
830
835
|
/**
|
|
@@ -846,7 +851,7 @@ export interface APIReaction {
|
|
|
846
851
|
/**
|
|
847
852
|
* Emoji information
|
|
848
853
|
*
|
|
849
|
-
* See https://discord.com/developers/
|
|
854
|
+
* See https://docs.discord.com/developers/resources/emoji#emoji-object
|
|
850
855
|
*/
|
|
851
856
|
emoji: APIPartialEmoji;
|
|
852
857
|
/**
|
|
@@ -855,7 +860,7 @@ export interface APIReaction {
|
|
|
855
860
|
burst_colors: string[];
|
|
856
861
|
}
|
|
857
862
|
/**
|
|
858
|
-
* https://discord.com/developers/
|
|
863
|
+
* https://docs.discord.com/developers/resources/channel#reaction-count-details-object-reaction-count-details-structure
|
|
859
864
|
*/
|
|
860
865
|
export interface APIReactionCountDetails {
|
|
861
866
|
/**
|
|
@@ -868,7 +873,7 @@ export interface APIReactionCountDetails {
|
|
|
868
873
|
normal: number;
|
|
869
874
|
}
|
|
870
875
|
/**
|
|
871
|
-
* https://discord.com/developers/
|
|
876
|
+
* https://docs.discord.com/developers/resources/channel#overwrite-object-overwrite-structure
|
|
872
877
|
*/
|
|
873
878
|
export interface APIOverwrite {
|
|
874
879
|
/**
|
|
@@ -884,7 +889,7 @@ export interface APIOverwrite {
|
|
|
884
889
|
/**
|
|
885
890
|
* Permission bit set
|
|
886
891
|
*
|
|
887
|
-
* See https://discord.com/developers/
|
|
892
|
+
* See https://docs.discord.com/developers/topics/permissions#permissions-bitwise-permission-flags
|
|
888
893
|
*
|
|
889
894
|
* See https://en.wikipedia.org/wiki/Bit_field
|
|
890
895
|
*/
|
|
@@ -892,14 +897,14 @@ export interface APIOverwrite {
|
|
|
892
897
|
/**
|
|
893
898
|
* Permission bit set
|
|
894
899
|
*
|
|
895
|
-
* See https://discord.com/developers/
|
|
900
|
+
* See https://docs.discord.com/developers/topics/permissions#permissions-bitwise-permission-flags
|
|
896
901
|
*
|
|
897
902
|
* See https://en.wikipedia.org/wiki/Bit_field
|
|
898
903
|
*/
|
|
899
904
|
deny: Permissions;
|
|
900
905
|
}
|
|
901
906
|
/**
|
|
902
|
-
* https://discord.com/developers/
|
|
907
|
+
* https://docs.discord.com/developers/resources/channel#thread-metadata-object-thread-metadata-structure
|
|
903
908
|
*/
|
|
904
909
|
export interface APIThreadMetadata {
|
|
905
910
|
/**
|
|
@@ -934,7 +939,7 @@ export declare enum ThreadAutoArchiveDuration {
|
|
|
934
939
|
OneWeek = 10080
|
|
935
940
|
}
|
|
936
941
|
/**
|
|
937
|
-
* https://discord.com/developers/
|
|
942
|
+
* https://docs.discord.com/developers/resources/channel#thread-member-object-thread-member-structure
|
|
938
943
|
*/
|
|
939
944
|
export interface APIThreadMember {
|
|
940
945
|
/**
|
|
@@ -997,7 +1002,7 @@ export interface APIThreadList {
|
|
|
997
1002
|
members: APIThreadMember[];
|
|
998
1003
|
}
|
|
999
1004
|
/**
|
|
1000
|
-
* https://discord.com/developers/
|
|
1005
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-structure
|
|
1001
1006
|
*
|
|
1002
1007
|
* Length limit: 6000 characters
|
|
1003
1008
|
*/
|
|
@@ -1011,7 +1016,7 @@ export interface APIEmbed {
|
|
|
1011
1016
|
/**
|
|
1012
1017
|
* Type of embed (always "rich" for webhook embeds)
|
|
1013
1018
|
*
|
|
1014
|
-
* See https://discord.com/developers/
|
|
1019
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-types
|
|
1015
1020
|
*/
|
|
1016
1021
|
type?: EmbedType;
|
|
1017
1022
|
/**
|
|
@@ -1035,37 +1040,37 @@ export interface APIEmbed {
|
|
|
1035
1040
|
/**
|
|
1036
1041
|
* Footer information
|
|
1037
1042
|
*
|
|
1038
|
-
* See https://discord.com/developers/
|
|
1043
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-footer-structure
|
|
1039
1044
|
*/
|
|
1040
1045
|
footer?: APIEmbedFooter;
|
|
1041
1046
|
/**
|
|
1042
1047
|
* Image information
|
|
1043
1048
|
*
|
|
1044
|
-
* See https://discord.com/developers/
|
|
1049
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-image-structure
|
|
1045
1050
|
*/
|
|
1046
1051
|
image?: APIEmbedImage;
|
|
1047
1052
|
/**
|
|
1048
1053
|
* Thumbnail information
|
|
1049
1054
|
*
|
|
1050
|
-
* See https://discord.com/developers/
|
|
1055
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-thumbnail-structure
|
|
1051
1056
|
*/
|
|
1052
1057
|
thumbnail?: APIEmbedThumbnail;
|
|
1053
1058
|
/**
|
|
1054
1059
|
* Video information
|
|
1055
1060
|
*
|
|
1056
|
-
* See https://discord.com/developers/
|
|
1061
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-video-structure
|
|
1057
1062
|
*/
|
|
1058
1063
|
video?: APIEmbedVideo;
|
|
1059
1064
|
/**
|
|
1060
1065
|
* Provider information
|
|
1061
1066
|
*
|
|
1062
|
-
* See https://discord.com/developers/
|
|
1067
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-provider-structure
|
|
1063
1068
|
*/
|
|
1064
1069
|
provider?: APIEmbedProvider;
|
|
1065
1070
|
/**
|
|
1066
1071
|
* Author information
|
|
1067
1072
|
*
|
|
1068
|
-
* See https://discord.com/developers/
|
|
1073
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-author-structure
|
|
1069
1074
|
*/
|
|
1070
1075
|
author?: APIEmbedAuthor;
|
|
1071
1076
|
/**
|
|
@@ -1073,12 +1078,12 @@ export interface APIEmbed {
|
|
|
1073
1078
|
*
|
|
1074
1079
|
* Length limit: 25 field objects
|
|
1075
1080
|
*
|
|
1076
|
-
* See https://discord.com/developers/
|
|
1081
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object-embed-field-structure
|
|
1077
1082
|
*/
|
|
1078
1083
|
fields?: APIEmbedField[];
|
|
1079
1084
|
}
|
|
1080
1085
|
/**
|
|
1081
|
-
* https://discord.com/developers/
|
|
1086
|
+
* https://docs.discord.com/developers/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1082
1087
|
*/
|
|
1083
1088
|
export interface PollResultEmbedField<T extends string, V extends string = string> {
|
|
1084
1089
|
name: T;
|
|
@@ -1086,7 +1091,7 @@ export interface PollResultEmbedField<T extends string, V extends string = strin
|
|
|
1086
1091
|
inline: false;
|
|
1087
1092
|
}
|
|
1088
1093
|
/**
|
|
1089
|
-
* https://discord.com/developers/
|
|
1094
|
+
* https://docs.discord.com/developers/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1090
1095
|
*/
|
|
1091
1096
|
export type PollResultEmbedFields = [
|
|
1092
1097
|
/** question text from the original poll */
|
|
@@ -1116,7 +1121,7 @@ export type APIEmbedPollResult = {
|
|
|
1116
1121
|
content_scan_version: number;
|
|
1117
1122
|
};
|
|
1118
1123
|
/**
|
|
1119
|
-
* https://discord.com/developers/
|
|
1124
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-types
|
|
1120
1125
|
*
|
|
1121
1126
|
*/
|
|
1122
1127
|
export declare enum EmbedType {
|
|
@@ -1146,7 +1151,7 @@ export declare enum EmbedType {
|
|
|
1146
1151
|
Link = "link",
|
|
1147
1152
|
/**
|
|
1148
1153
|
* Poll result embed
|
|
1149
|
-
* https://discord.com/developers/
|
|
1154
|
+
* https://docs.discord.com/developers/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1150
1155
|
*/
|
|
1151
1156
|
PollResult = "poll_result",
|
|
1152
1157
|
/**
|
|
@@ -1157,7 +1162,7 @@ export declare enum EmbedType {
|
|
|
1157
1162
|
AutoModerationMessage = "auto_moderation_message"
|
|
1158
1163
|
}
|
|
1159
1164
|
/**
|
|
1160
|
-
* https://discord.com/developers/
|
|
1165
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-thumbnail-structure
|
|
1161
1166
|
*/
|
|
1162
1167
|
export interface APIEmbedThumbnail {
|
|
1163
1168
|
/**
|
|
@@ -1178,7 +1183,7 @@ export interface APIEmbedThumbnail {
|
|
|
1178
1183
|
width?: number;
|
|
1179
1184
|
}
|
|
1180
1185
|
/**
|
|
1181
|
-
* https://discord.com/developers/
|
|
1186
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-video-structure
|
|
1182
1187
|
*/
|
|
1183
1188
|
export interface APIEmbedVideo {
|
|
1184
1189
|
/**
|
|
@@ -1199,7 +1204,7 @@ export interface APIEmbedVideo {
|
|
|
1199
1204
|
width?: number;
|
|
1200
1205
|
}
|
|
1201
1206
|
/**
|
|
1202
|
-
* https://discord.com/developers/
|
|
1207
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-image-structure
|
|
1203
1208
|
*/
|
|
1204
1209
|
export interface APIEmbedImage {
|
|
1205
1210
|
/**
|
|
@@ -1220,7 +1225,7 @@ export interface APIEmbedImage {
|
|
|
1220
1225
|
width?: number;
|
|
1221
1226
|
}
|
|
1222
1227
|
/**
|
|
1223
|
-
* https://discord.com/developers/
|
|
1228
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-provider-structure
|
|
1224
1229
|
*/
|
|
1225
1230
|
export interface APIEmbedProvider {
|
|
1226
1231
|
/**
|
|
@@ -1233,7 +1238,7 @@ export interface APIEmbedProvider {
|
|
|
1233
1238
|
url?: string;
|
|
1234
1239
|
}
|
|
1235
1240
|
/**
|
|
1236
|
-
* https://discord.com/developers/
|
|
1241
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-author-structure
|
|
1237
1242
|
*/
|
|
1238
1243
|
export interface APIEmbedAuthor {
|
|
1239
1244
|
/**
|
|
@@ -1256,7 +1261,7 @@ export interface APIEmbedAuthor {
|
|
|
1256
1261
|
proxy_icon_url?: string;
|
|
1257
1262
|
}
|
|
1258
1263
|
/**
|
|
1259
|
-
* https://discord.com/developers/
|
|
1264
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-footer-structure
|
|
1260
1265
|
*/
|
|
1261
1266
|
export interface APIEmbedFooter {
|
|
1262
1267
|
/**
|
|
@@ -1275,7 +1280,7 @@ export interface APIEmbedFooter {
|
|
|
1275
1280
|
proxy_icon_url?: string;
|
|
1276
1281
|
}
|
|
1277
1282
|
/**
|
|
1278
|
-
* https://discord.com/developers/
|
|
1283
|
+
* https://docs.discord.com/developers/resources/channel#embed-object-embed-field-structure
|
|
1279
1284
|
*/
|
|
1280
1285
|
export interface APIEmbedField {
|
|
1281
1286
|
/**
|
|
@@ -1296,7 +1301,7 @@ export interface APIEmbedField {
|
|
|
1296
1301
|
inline?: boolean;
|
|
1297
1302
|
}
|
|
1298
1303
|
/**
|
|
1299
|
-
* https://discord.com/developers/
|
|
1304
|
+
* https://docs.discord.com/developers/resources/channel#attachment-object-attachment-structure
|
|
1300
1305
|
*/
|
|
1301
1306
|
export interface APIAttachment {
|
|
1302
1307
|
/**
|
|
@@ -1359,16 +1364,20 @@ export interface APIAttachment {
|
|
|
1359
1364
|
flags?: AttachmentFlags;
|
|
1360
1365
|
}
|
|
1361
1366
|
/**
|
|
1362
|
-
* https://discord.com/developers/
|
|
1367
|
+
* https://docs.discord.com/developers/resources/channel#attachment-object-attachment-structure-attachment-flags
|
|
1363
1368
|
*/
|
|
1364
1369
|
export declare enum AttachmentFlags {
|
|
1365
1370
|
/**
|
|
1366
1371
|
* This attachment has been edited using the remix feature on mobile
|
|
1367
1372
|
*/
|
|
1368
|
-
IsRemix = 4
|
|
1373
|
+
IsRemix = 4,
|
|
1374
|
+
/**
|
|
1375
|
+
* This attachment was marked as a spoiler
|
|
1376
|
+
*/
|
|
1377
|
+
IsSpoiler = 8
|
|
1369
1378
|
}
|
|
1370
1379
|
/**
|
|
1371
|
-
* https://discord.com/developers/
|
|
1380
|
+
* https://docs.discord.com/developers/resources/channel#channel-mention-object-channel-mention-structure
|
|
1372
1381
|
*/
|
|
1373
1382
|
export interface APIChannelMention {
|
|
1374
1383
|
/**
|
|
@@ -1382,7 +1391,7 @@ export interface APIChannelMention {
|
|
|
1382
1391
|
/**
|
|
1383
1392
|
* The type of channel
|
|
1384
1393
|
*
|
|
1385
|
-
* See https://discord.com/developers/
|
|
1394
|
+
* See https://docs.discord.com/developers/resources/channel#channel-object-channel-types
|
|
1386
1395
|
*/
|
|
1387
1396
|
type: ChannelType;
|
|
1388
1397
|
/**
|
|
@@ -1391,7 +1400,7 @@ export interface APIChannelMention {
|
|
|
1391
1400
|
name: string;
|
|
1392
1401
|
}
|
|
1393
1402
|
/**
|
|
1394
|
-
* https://discord.com/developers/
|
|
1403
|
+
* https://docs.discord.com/developers/resources/channel#allowed-mentions-object-allowed-mention-types
|
|
1395
1404
|
*/
|
|
1396
1405
|
export declare enum AllowedMentionsTypes {
|
|
1397
1406
|
/**
|
|
@@ -1408,13 +1417,13 @@ export declare enum AllowedMentionsTypes {
|
|
|
1408
1417
|
User = "users"
|
|
1409
1418
|
}
|
|
1410
1419
|
/**
|
|
1411
|
-
* https://discord.com/developers/
|
|
1420
|
+
* https://docs.discord.com/developers/resources/channel#allowed-mentions-object-allowed-mentions-structure
|
|
1412
1421
|
*/
|
|
1413
1422
|
export interface APIAllowedMentions {
|
|
1414
1423
|
/**
|
|
1415
1424
|
* An array of allowed mention types to parse from the content
|
|
1416
1425
|
*
|
|
1417
|
-
* See https://discord.com/developers/
|
|
1426
|
+
* See https://docs.discord.com/developers/resources/channel#allowed-mentions-object-allowed-mention-types
|
|
1418
1427
|
*/
|
|
1419
1428
|
parse?: `${AllowedMentionsTypes}`[];
|
|
1420
1429
|
/**
|