Compare commits

..

11 Commits

Author SHA1 Message Date
almeidx
0c3830e839 fix(Channel): narrow thread creation message and result types
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:34:17 +01:00
renovate[bot]
bece6b84ee chore(deps): lock file maintenance (#1623)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-10 14:47:51 +00:00
renovate[bot]
e9e7f5c24f chore(deps): update eslint/prettier (#1621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-10 09:17:19 +00:00
renovate[bot]
e1b27cd5a9 chore(deps): update patch/minor dependencies (#1622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-10 05:22:58 +00:00
Almeida
5acf5c5989 feat(UserFlags): mark ActiveDeveloper as deprecated (#1604) 2026-04-09 18:27:24 +03:00
Kshitij Anurag
d165766302 fix: APIUser global_name description (#1586) 2026-04-09 18:27:15 +03:00
Kshitij Anurag
702e541bf0 feat(Message): more attachment and embed fields and flags (#1609) 2026-04-09 18:25:47 +03:00
Almeida
27ef064f92 fix(Webhook): add delete message query, fix thread_id type (#1611)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:23:34 +03:00
Almeida
c21ae24f7a fix(ReactionType): rename Super to Burst (#1613)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:23:06 +03:00
Almeida
b2a8b740e5 fix(Gateway): correct scheduled event user remove dispatch type (#1614)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:22:45 +03:00
Almeida
19d04c00c9 fix(Channel): add applied_tags to forum thread form data body (#1615)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:22:25 +03:00
22 changed files with 1829 additions and 1060 deletions

2
deno/gateway/v10.ts generated
View File

@@ -1382,7 +1382,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
*/
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildScheduledEventUserRemove,
GatewayGuildScheduledEventUserAddDispatchData
GatewayGuildScheduledEventUserRemoveDispatchData
>;
/**

2
deno/gateway/v9.ts generated
View File

@@ -1381,7 +1381,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
*/
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildScheduledEventUserRemove,
GatewayGuildScheduledEventUserAddDispatchData
GatewayGuildScheduledEventUserRemoveDispatchData
>;
/**

View File

@@ -617,9 +617,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
*/
thumbnail?: APIEmbedThumbnail;
thumbnail?: APIEmbedImage;
/**
* Video information
*
@@ -646,6 +646,13 @@ export interface APIEmbed {
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
*/
fields?: APIEmbedField[];
/**
* Embed flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedFlags;
}
/**
@@ -689,27 +696,30 @@ export enum EmbedType {
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
*/
export interface APIEmbedThumbnail {
export enum EmbedFlags {
/**
* Source url of thumbnail (only supports http(s) and attachments)
* This embed is a fallback for a reply to an activity card
*/
url: string;
/**
* A proxied url of the thumbnail
*/
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 5,
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -730,6 +740,33 @@ export interface APIEmbedVideo {
* Width of video
*/
width?: number;
/**
* The video's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the video
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the video
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -752,6 +789,33 @@ export interface APIEmbedImage {
* Width of image
*/
width?: number;
/**
* The image's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the image
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the image
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -854,7 +918,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description for the file
* Description (alt text) for the file (max 1024 characters)
*/
description?: string;
/**
@@ -876,15 +940,27 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image)
* Height of file (if image or video)
*/
height?: number | null;
/**
* Width of file (if image)
* Width of file (if image or video)
*/
width?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder (if image or video)
*/
placeholder_version?: number;
/**
* Whether this attachment is ephemeral
*
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
*/
ephemeral?: boolean;
/**
@@ -899,16 +975,48 @@ export interface APIAttachment {
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
/**
* For Clips, array of users who were in the stream
*/
clip_participants?: APIUser[];
/**
* For Clips, when the clip was created
*/
clip_created_at?: string;
/**
* For Clips, the application in the stream, if recognized
*/
application?: APIApplication | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
*/
export enum AttachmentFlags {
/**
* This attachment is a Clip from a stream
*
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
*/
IsClip = 1 << 0,
/**
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
*/
IsThumbnail = 1 << 1,
/**
* This attachment has been edited using the remix feature on mobile
*
* @deprecated
*/
IsRemix = 1 << 2,
/**
* This attachment was marked as a spoiler and is blurred until clicked
*/
IsSpoiler = 1 << 3,
/**
* This attachment is an animated image
*/
IsAnimated = 1 << 5,
}
/**
@@ -1482,6 +1590,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1494,37 +1605,78 @@ export enum UnfurledMediaItemLoadingState {
*/
export interface APIUnfurledMediaItem {
/**
* Supports arbitrary urls and attachment://<filename> references
* Supports arbitrary urls and `attachment://<filename>` references
*/
url: string;
/**
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
* The proxied url of the media item
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
proxy_url?: string;
/**
* The width of the media item. This field is ignored and provided by the API as part of the response
* The width of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
width?: number | null;
/**
* The height of the media item. This field is ignored and provided by the API as part of the response
* The height of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
height?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string | null;
/**
* Version of the placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
placeholder_version?: number | null;
/**
* The media type of the content. This field is ignored and provided by the API as part of the response
* The media type of the content
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string | null;
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
/**
* Unfurled media item flags combined as a bitfield
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: UnfurledMediaItemFlags;
/**
* The id of the uploaded attachment.
*
* @remarks This field is ignored and provided by the API as part of the response.
* @remarks Only present if the media item was uploaded as an attachment.
*/
attachment_id?: Snowflake;
}
/**
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
*/
export enum UnfurledMediaItemFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 0,
}
/**
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
* The user's display name, if it is set
*/
global_name: string | null;
/**
@@ -194,6 +194,8 @@ export enum UserFlags {
DisablePremium = 1 << 21,
/**
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
*/
ActiveDeveloper = 1 << 22,
/**

View File

@@ -612,9 +612,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
*/
thumbnail?: APIEmbedThumbnail;
thumbnail?: APIEmbedImage;
/**
* Video information
*
@@ -641,6 +641,13 @@ export interface APIEmbed {
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
*/
fields?: APIEmbedField[];
/**
* Embed flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedFlags;
}
/**
@@ -684,27 +691,30 @@ export enum EmbedType {
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
*/
export interface APIEmbedThumbnail {
export enum EmbedFlags {
/**
* Source url of thumbnail (only supports http(s) and attachments)
* This embed is a fallback for a reply to an activity card
*/
url: string;
/**
* A proxied url of the thumbnail
*/
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 5,
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -725,6 +735,33 @@ export interface APIEmbedVideo {
* Width of video
*/
width?: number;
/**
* The video's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the video
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the video
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -747,6 +784,33 @@ export interface APIEmbedImage {
* Width of image
*/
width?: number;
/**
* The image's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the image
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the image
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -849,7 +913,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description for the file
* Description (alt text) for the file (max 1024 characters)
*/
description?: string;
/**
@@ -871,15 +935,27 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image)
* Height of file (if image or video)
*/
height?: number | null;
/**
* Width of file (if image)
* Width of file (if image or video)
*/
width?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder (if image or video)
*/
placeholder_version?: number;
/**
* Whether this attachment is ephemeral
*
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
*/
ephemeral?: boolean;
/**
@@ -894,16 +970,48 @@ export interface APIAttachment {
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
/**
* For Clips, array of users who were in the stream
*/
clip_participants?: APIUser[];
/**
* For Clips, when the clip was created
*/
clip_created_at?: string;
/**
* For Clips, the application in the stream, if recognized
*/
application?: APIApplication | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
*/
export enum AttachmentFlags {
/**
* This attachment is a Clip from a stream
*
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
*/
IsClip = 1 << 0,
/**
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
*/
IsThumbnail = 1 << 1,
/**
* This attachment has been edited using the remix feature on mobile
*
* @deprecated
*/
IsRemix = 1 << 2,
/**
* This attachment was marked as a spoiler and is blurred until clicked
*/
IsSpoiler = 1 << 3,
/**
* This attachment is an animated image
*/
IsAnimated = 1 << 5,
}
/**
@@ -1477,6 +1585,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1489,37 +1600,78 @@ export enum UnfurledMediaItemLoadingState {
*/
export interface APIUnfurledMediaItem {
/**
* Supports arbitrary urls and attachment://<filename> references
* Supports arbitrary urls and `attachment://<filename>` references
*/
url: string;
/**
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
* The proxied url of the media item
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
proxy_url?: string;
/**
* The width of the media item. This field is ignored and provided by the API as part of the response
* The width of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
width?: number | null;
/**
* The height of the media item. This field is ignored and provided by the API as part of the response
* The height of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
height?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string | null;
/**
* Version of the placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
placeholder_version?: number | null;
/**
* The media type of the content. This field is ignored and provided by the API as part of the response
* The media type of the content
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string | null;
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
/**
* Unfurled media item flags combined as a bitfield
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: UnfurledMediaItemFlags;
/**
* The id of the uploaded attachment.
*
* @remarks This field is ignored and provided by the API as part of the response.
* @remarks Only present if the media item was uploaded as an attachment.
*/
attachment_id?: Snowflake;
}
/**
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
*/
export enum UnfurledMediaItemFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 0,
}
/**
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
* The user's display name, if it is set
*/
global_name: string | null;
/**
@@ -194,6 +194,8 @@ export enum UserFlags {
DisablePremium = 1 << 21,
/**
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
*/
ActiveDeveloper = 1 << 22,
/**

View File

@@ -411,7 +411,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
Super,
Burst,
// eslint-disable @typescript-eslint/no-duplicate-enum-values
/**
* @deprecated Use {@link ReactionType.Burst} instead
*/
Super = Burst,
// eslint-enable @typescript-eslint/no-duplicate-enum-values
}
/**
@@ -707,7 +713,7 @@ export type RESTPutAPIChannelRecipientResult = unknown;
export type RESTDeleteAPIChannelRecipientResult = unknown;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -725,36 +731,15 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
export type RESTPostAPIChannelMessagesThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
};
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -772,13 +757,59 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object}
*/
export type RESTAPIForumThreadMessageParams = Pick<
RESTPostAPIChannelMessageJSONBody,
'allowed_mentions' | 'attachments' | 'components' | 'content' | 'embeds' | 'flags' | 'sticker_ids'
>;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTAPIForumThreadMessageParams;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export interface RESTPostAPIGuildForumThreadsResult extends APIPublicThreadChannel {
/**
* The message that was created with the thread
*/
message: APIMessage;
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
*/

View File

@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
*/
export interface RESTGetAPIWebhookWithTokenMessageQuery {
thread_id?: string;
thread_id?: Snowflake;
}
/**
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
*/
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
/**
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
*/
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
thread_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
*/

View File

@@ -418,7 +418,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
Super,
Burst,
// eslint-disable @typescript-eslint/no-duplicate-enum-values
/**
* @deprecated Use {@link ReactionType.Burst} instead
*/
Super = Burst,
// eslint-enable @typescript-eslint/no-duplicate-enum-values
}
/**
@@ -720,7 +726,7 @@ export type RESTPutAPIChannelRecipientResult = unknown;
export type RESTDeleteAPIChannelRecipientResult = unknown;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -738,36 +744,15 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
export type RESTPostAPIChannelMessagesThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
};
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -785,13 +770,59 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object}
*/
export type RESTAPIForumThreadMessageParams = Pick<
RESTPostAPIChannelMessageJSONBody,
'allowed_mentions' | 'attachments' | 'components' | 'content' | 'embeds' | 'flags' | 'sticker_ids'
>;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTAPIForumThreadMessageParams;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export interface RESTPostAPIGuildForumThreadsResult extends APIPublicThreadChannel {
/**
* The message that was created with the thread
*/
message: APIMessage;
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
*/

View File

@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
*/
export interface RESTGetAPIWebhookWithTokenMessageQuery {
thread_id?: string;
thread_id?: Snowflake;
}
/**
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
*/
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
/**
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
*/
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
thread_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
*/

View File

@@ -309,6 +309,7 @@ export default config([
'RESTAPIInteractionCallbackObject',
'RESTAPIInteractionCallbackResourceObject',
'RESTAPIMessageReference',
'RESTAPIForumThreadMessageParams',
'RESTAPIPartialCurrentUserGuild',
'RESTAPIPoll',
'RESTOAuth2TokenOptionalClientCredentials',

View File

@@ -1382,7 +1382,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
*/
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildScheduledEventUserRemove,
GatewayGuildScheduledEventUserAddDispatchData
GatewayGuildScheduledEventUserRemoveDispatchData
>;
/**

View File

@@ -1381,7 +1381,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
*/
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildScheduledEventUserRemove,
GatewayGuildScheduledEventUserAddDispatchData
GatewayGuildScheduledEventUserRemoveDispatchData
>;
/**

View File

@@ -617,9 +617,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
*/
thumbnail?: APIEmbedThumbnail;
thumbnail?: APIEmbedImage;
/**
* Video information
*
@@ -646,6 +646,13 @@ export interface APIEmbed {
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
*/
fields?: APIEmbedField[];
/**
* Embed flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedFlags;
}
/**
@@ -689,27 +696,30 @@ export enum EmbedType {
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
*/
export interface APIEmbedThumbnail {
export enum EmbedFlags {
/**
* Source url of thumbnail (only supports http(s) and attachments)
* This embed is a fallback for a reply to an activity card
*/
url: string;
/**
* A proxied url of the thumbnail
*/
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 5,
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -730,6 +740,33 @@ export interface APIEmbedVideo {
* Width of video
*/
width?: number;
/**
* The video's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the video
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the video
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -752,6 +789,33 @@ export interface APIEmbedImage {
* Width of image
*/
width?: number;
/**
* The image's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the image
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the image
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -854,7 +918,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description for the file
* Description (alt text) for the file (max 1024 characters)
*/
description?: string;
/**
@@ -876,15 +940,27 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image)
* Height of file (if image or video)
*/
height?: number | null;
/**
* Width of file (if image)
* Width of file (if image or video)
*/
width?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder (if image or video)
*/
placeholder_version?: number;
/**
* Whether this attachment is ephemeral
*
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
*/
ephemeral?: boolean;
/**
@@ -899,16 +975,48 @@ export interface APIAttachment {
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
/**
* For Clips, array of users who were in the stream
*/
clip_participants?: APIUser[];
/**
* For Clips, when the clip was created
*/
clip_created_at?: string;
/**
* For Clips, the application in the stream, if recognized
*/
application?: APIApplication | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
*/
export enum AttachmentFlags {
/**
* This attachment is a Clip from a stream
*
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
*/
IsClip = 1 << 0,
/**
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
*/
IsThumbnail = 1 << 1,
/**
* This attachment has been edited using the remix feature on mobile
*
* @deprecated
*/
IsRemix = 1 << 2,
/**
* This attachment was marked as a spoiler and is blurred until clicked
*/
IsSpoiler = 1 << 3,
/**
* This attachment is an animated image
*/
IsAnimated = 1 << 5,
}
/**
@@ -1482,6 +1590,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1494,37 +1605,78 @@ export enum UnfurledMediaItemLoadingState {
*/
export interface APIUnfurledMediaItem {
/**
* Supports arbitrary urls and attachment://<filename> references
* Supports arbitrary urls and `attachment://<filename>` references
*/
url: string;
/**
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
* The proxied url of the media item
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
proxy_url?: string;
/**
* The width of the media item. This field is ignored and provided by the API as part of the response
* The width of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
width?: number | null;
/**
* The height of the media item. This field is ignored and provided by the API as part of the response
* The height of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
height?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string | null;
/**
* Version of the placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
placeholder_version?: number | null;
/**
* The media type of the content. This field is ignored and provided by the API as part of the response
* The media type of the content
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string | null;
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
/**
* Unfurled media item flags combined as a bitfield
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: UnfurledMediaItemFlags;
/**
* The id of the uploaded attachment.
*
* @remarks This field is ignored and provided by the API as part of the response.
* @remarks Only present if the media item was uploaded as an attachment.
*/
attachment_id?: Snowflake;
}
/**
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
*/
export enum UnfurledMediaItemFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 0,
}
/**
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
* The user's display name, if it is set
*/
global_name: string | null;
/**
@@ -194,6 +194,8 @@ export enum UserFlags {
DisablePremium = 1 << 21,
/**
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
*/
ActiveDeveloper = 1 << 22,
/**

View File

@@ -612,9 +612,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
*/
thumbnail?: APIEmbedThumbnail;
thumbnail?: APIEmbedImage;
/**
* Video information
*
@@ -641,6 +641,13 @@ export interface APIEmbed {
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
*/
fields?: APIEmbedField[];
/**
* Embed flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedFlags;
}
/**
@@ -684,27 +691,30 @@ export enum EmbedType {
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
*/
export interface APIEmbedThumbnail {
export enum EmbedFlags {
/**
* Source url of thumbnail (only supports http(s) and attachments)
* This embed is a fallback for a reply to an activity card
*/
url: string;
/**
* A proxied url of the thumbnail
*/
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 5,
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -725,6 +735,33 @@ export interface APIEmbedVideo {
* Width of video
*/
width?: number;
/**
* The video's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the video
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the video
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -747,6 +784,33 @@ export interface APIEmbedImage {
* Width of image
*/
width?: number;
/**
* The image's media type
*
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string;
/**
* ThumbHash placeholder of the image
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder
*/
placeholder_version?: number;
/**
* Description (alt text) for the image
*/
description?: string;
/**
* Embed media flags combined as a bitfield
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: EmbedMediaFlags;
}
/**
@@ -849,7 +913,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description for the file
* Description (alt text) for the file (max 1024 characters)
*/
description?: string;
/**
@@ -871,15 +935,27 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image)
* Height of file (if image or video)
*/
height?: number | null;
/**
* Width of file (if image)
* Width of file (if image or video)
*/
width?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string;
/**
* Version of the placeholder (if image or video)
*/
placeholder_version?: number;
/**
* Whether this attachment is ephemeral
*
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
*/
ephemeral?: boolean;
/**
@@ -894,16 +970,48 @@ export interface APIAttachment {
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
/**
* For Clips, array of users who were in the stream
*/
clip_participants?: APIUser[];
/**
* For Clips, when the clip was created
*/
clip_created_at?: string;
/**
* For Clips, the application in the stream, if recognized
*/
application?: APIApplication | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
*/
export enum AttachmentFlags {
/**
* This attachment is a Clip from a stream
*
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
*/
IsClip = 1 << 0,
/**
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
*/
IsThumbnail = 1 << 1,
/**
* This attachment has been edited using the remix feature on mobile
*
* @deprecated
*/
IsRemix = 1 << 2,
/**
* This attachment was marked as a spoiler and is blurred until clicked
*/
IsSpoiler = 1 << 3,
/**
* This attachment is an animated image
*/
IsAnimated = 1 << 5,
}
/**
@@ -1477,6 +1585,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1489,37 +1600,78 @@ export enum UnfurledMediaItemLoadingState {
*/
export interface APIUnfurledMediaItem {
/**
* Supports arbitrary urls and attachment://<filename> references
* Supports arbitrary urls and `attachment://<filename>` references
*/
url: string;
/**
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
* The proxied url of the media item
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
proxy_url?: string;
/**
* The width of the media item. This field is ignored and provided by the API as part of the response
* The width of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
width?: number | null;
/**
* The height of the media item. This field is ignored and provided by the API as part of the response
* The height of the media item (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
height?: number | null;
/**
* ThumbHash placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://evanw.github.io/thumbhash/}
*/
placeholder?: string | null;
/**
* Version of the placeholder (if image or video)
*
* @remarks This field is ignored and provided by the API as part of the response.
*/
placeholder_version?: number | null;
/**
* The media type of the content. This field is ignored and provided by the API as part of the response
* The media type of the content
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://en.wikipedia.org/wiki/Media_type}
*/
content_type?: string | null;
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
/**
* Unfurled media item flags combined as a bitfield
*
* @remarks This field is ignored and provided by the API as part of the response.
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: UnfurledMediaItemFlags;
/**
* The id of the uploaded attachment.
*
* @remarks This field is ignored and provided by the API as part of the response.
* @remarks Only present if the media item was uploaded as an attachment.
*/
attachment_id?: Snowflake;
}
/**
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
*/
export enum UnfurledMediaItemFlags {
/**
* This image is animated
*/
IsAnimated = 1 << 0,
}
/**
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
* The user's display name, if it is set
*/
global_name: string | null;
/**
@@ -194,6 +194,8 @@ export enum UserFlags {
DisablePremium = 1 << 21,
/**
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
*/
ActiveDeveloper = 1 << 22,
/**

View File

@@ -411,7 +411,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
Super,
Burst,
// eslint-disable @typescript-eslint/no-duplicate-enum-values
/**
* @deprecated Use {@link ReactionType.Burst} instead
*/
Super = Burst,
// eslint-enable @typescript-eslint/no-duplicate-enum-values
}
/**
@@ -707,7 +713,7 @@ export type RESTPutAPIChannelRecipientResult = unknown;
export type RESTDeleteAPIChannelRecipientResult = unknown;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -725,36 +731,15 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
export type RESTPostAPIChannelMessagesThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
};
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -772,13 +757,59 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object}
*/
export type RESTAPIForumThreadMessageParams = Pick<
RESTPostAPIChannelMessageJSONBody,
'allowed_mentions' | 'attachments' | 'components' | 'content' | 'embeds' | 'flags' | 'sticker_ids'
>;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTAPIForumThreadMessageParams;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export interface RESTPostAPIGuildForumThreadsResult extends APIPublicThreadChannel {
/**
* The message that was created with the thread
*/
message: APIMessage;
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
*/

View File

@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
*/
export interface RESTGetAPIWebhookWithTokenMessageQuery {
thread_id?: string;
thread_id?: Snowflake;
}
/**
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
*/
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
/**
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
*/
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
thread_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
*/

View File

@@ -418,7 +418,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
Super,
Burst,
// eslint-disable @typescript-eslint/no-duplicate-enum-values
/**
* @deprecated Use {@link ReactionType.Burst} instead
*/
Super = Burst,
// eslint-enable @typescript-eslint/no-duplicate-enum-values
}
/**
@@ -720,7 +726,7 @@ export type RESTPutAPIChannelRecipientResult = unknown;
export type RESTDeleteAPIChannelRecipientResult = unknown;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -738,36 +744,15 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
export type RESTPostAPIChannelMessagesThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
};
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -785,13 +770,59 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object}
*/
export type RESTAPIForumThreadMessageParams = Pick<
RESTPostAPIChannelMessageJSONBody,
'allowed_mentions' | 'attachments' | 'components' | 'content' | 'embeds' | 'flags' | 'sticker_ids'
>;
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: RESTAPIForumThreadMessageParams;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* The initial message of the thread
*/
message: string;
/**
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
*/
export interface RESTPostAPIGuildForumThreadsResult extends APIPublicThreadChannel {
/**
* The message that was created with the thread
*/
message: APIMessage;
}
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
*/

View File

@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
*/
export interface RESTGetAPIWebhookWithTokenMessageQuery {
thread_id?: string;
thread_id?: Snowflake;
}
/**
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
*/
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
/**
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
*/
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
thread_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
*/

1616
yarn.lock

File diff suppressed because it is too large Load Diff