Compare commits

..

1 Commits

Author SHA1 Message Date
almeidx
213cb1692a fix(Teams): use partial user type on team member
The docs specify that the user field on team members is a partial user
object containing only avatar, discriminator, id, and username.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 00:05:15 +01:00
47 changed files with 2105 additions and 2221 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@ enableGlobalCache: true
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.15.0.cjs
yarnPath: .yarn/releases/yarn-4.13.0.cjs
plugins:
- path: ./.yarn/plugins/postinstallDev.cjs

View File

@@ -1,36 +1,3 @@
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
### Features
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
### Bug Fixes
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
### Features
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
### Bug Fixes
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)

33
deno/CHANGELOG.md generated
View File

@@ -1,36 +1,3 @@
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
### Features
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
### Bug Fixes
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
### Features
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
### Bug Fixes
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)

2
deno/gateway/v10.ts generated
View File

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

2
deno/gateway/v9.ts generated
View File

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

View File

@@ -87,7 +87,7 @@ export interface APIBaseMessageNoChannel {
*/
mention_channels?: APIChannelMention[];
/**
* Any attached files that are not referenced in embeds or components
* Any attached files
*
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*
@@ -617,9 +617,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
thumbnail?: APIEmbedImage;
thumbnail?: APIEmbedThumbnail;
/**
* Video information
*
@@ -646,13 +646,6 @@ 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;
}
/**
@@ -696,30 +689,27 @@ export enum EmbedType {
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
export enum EmbedFlags {
export interface APIEmbedThumbnail {
/**
* This embed is a fallback for a reply to an activity card
* Source url of thumbnail (only supports http(s) and attachments)
*/
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
url: string;
/**
* This image is animated
* A proxied url of the thumbnail
*/
IsAnimated = 1 << 5,
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -740,33 +730,6 @@ 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;
}
/**
@@ -789,33 +752,6 @@ 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;
}
/**
@@ -918,7 +854,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description (alt text) for the file (max 1024 characters)
* Description for the file
*/
description?: string;
/**
@@ -940,27 +876,15 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image or video)
* Height of file (if image)
*/
height?: number | null;
/**
* Width of file (if image or video)
* Width of file (if image)
*/
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;
/**
@@ -975,48 +899,16 @@ 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://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-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,
}
/**
@@ -1590,9 +1482,6 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1605,78 +1494,37 @@ 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
*
* @remarks This field is ignored and provided by the API as part of the response.
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
*/
proxy_url?: string;
/**
* 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.
* The width of the media item. This field is ignored and provided by the API as part of the response
*/
width?: number | null;
/**
* 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.
* The height of the media item. 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
* The media type of the content. This field is ignored and provided by the API as part of the response
*
* @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;
/**
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* 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.
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
*/
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

@@ -56,7 +56,7 @@ export interface APITeamMember {
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
user: Pick<APIUser, 'avatar' | 'discriminator' | 'id' | 'username'>;
/**
* The user's role in the team.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
@@ -194,8 +194,6 @@ 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

@@ -86,7 +86,7 @@ export interface APIBaseMessageNoChannel {
*/
mention_channels?: APIChannelMention[];
/**
* Any attached files that are not referenced in embeds or components
* Any attached files
*
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*
@@ -612,9 +612,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
thumbnail?: APIEmbedImage;
thumbnail?: APIEmbedThumbnail;
/**
* Video information
*
@@ -641,13 +641,6 @@ 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;
}
/**
@@ -691,30 +684,27 @@ export enum EmbedType {
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
export enum EmbedFlags {
export interface APIEmbedThumbnail {
/**
* This embed is a fallback for a reply to an activity card
* Source url of thumbnail (only supports http(s) and attachments)
*/
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
url: string;
/**
* This image is animated
* A proxied url of the thumbnail
*/
IsAnimated = 1 << 5,
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -735,33 +725,6 @@ 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;
}
/**
@@ -784,33 +747,6 @@ 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;
}
/**
@@ -913,7 +849,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description (alt text) for the file (max 1024 characters)
* Description for the file
*/
description?: string;
/**
@@ -935,27 +871,15 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image or video)
* Height of file (if image)
*/
height?: number | null;
/**
* Width of file (if image or video)
* Width of file (if image)
*/
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;
/**
@@ -970,48 +894,16 @@ 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://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-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,
}
/**
@@ -1585,9 +1477,6 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1600,78 +1489,37 @@ 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
*
* @remarks This field is ignored and provided by the API as part of the response.
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
*/
proxy_url?: string;
/**
* 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.
* The width of the media item. This field is ignored and provided by the API as part of the response
*/
width?: number | null;
/**
* 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.
* The height of the media item. 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
* The media type of the content. This field is ignored and provided by the API as part of the response
*
* @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;
/**
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* 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.
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
*/
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

@@ -56,7 +56,7 @@ export interface APITeamMember {
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
user: Pick<APIUser, 'avatar' | 'discriminator' | 'id' | 'username'>;
/**
* The user's role in the team.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
@@ -194,8 +194,6 @@ 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,
/**

14
deno/rest/common.ts generated
View File

@@ -75,16 +75,8 @@ export enum RESTJSONErrorCodes {
UnderMinimumAge = 20_024,
ChannelWriteRateLimit = 20_028,
/**
* @deprecated Use {@link RESTJSONErrorCodes.ChannelWriteRateLimit} instead
*/
ChannelSendRateLimit = ChannelWriteRateLimit,
ServerWriteRateLimit = 20_029,
/**
* @deprecated Use {@link RESTJSONErrorCodes.ServerWriteRateLimit} instead
*/
ServerSendRateLimit = ServerWriteRateLimit,
ChannelSendRateLimit = 20_028,
ServerSendRateLimit,
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20_031,
@@ -309,8 +301,6 @@ export enum RESTJSONErrorCodes {
MaximumActiveThreads,
MaximumActiveAnnouncementThreads,
CannotForwardMessageWithUnreadableContent = 160_014,
InvalidJSONForUploadedLottieFile = 170_001,
UploadedLottiesCannotContainRasterizedImages,
StickerMaximumFramerateExceeded,

View File

@@ -411,13 +411,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
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
Super,
}
/**
@@ -752,10 +746,6 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
* 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;
};
/**

View File

@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
*/
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}

2
deno/rest/v10/user.ts generated
View File

@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
/**
* The recipient to open a DM channel with
*/
recipient_id: Snowflake;
recipient_id: string;
}
/**

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?: Snowflake;
thread_id?: string;
}
/**
@@ -309,13 +309,6 @@ 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,13 +418,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
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
Super,
}
/**
@@ -765,10 +759,6 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
* 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;
};
/**

View File

@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
*/
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}

2
deno/rest/v9/user.ts generated
View File

@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
/**
* The recipient to open a DM channel with
*/
recipient_id: Snowflake;
recipient_id: string;
}
/**

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?: Snowflake;
thread_id?: string;
}
/**
@@ -309,13 +309,6 @@ 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

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.38.47",
"version": "0.38.44",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"workspaces": [
@@ -207,9 +207,9 @@
]
}
},
"packageManager": "yarn@4.15.0",
"packageManager": "yarn@4.13.0",
"volta": {
"node": "24.16.0",
"yarn": "4.15.0"
"node": "24.14.1",
"yarn": "4.13.0"
}
}

View File

@@ -87,7 +87,7 @@ export interface APIBaseMessageNoChannel {
*/
mention_channels?: APIChannelMention[];
/**
* Any attached files that are not referenced in embeds or components
* Any attached files
*
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*
@@ -617,9 +617,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
thumbnail?: APIEmbedImage;
thumbnail?: APIEmbedThumbnail;
/**
* Video information
*
@@ -646,13 +646,6 @@ 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;
}
/**
@@ -696,30 +689,27 @@ export enum EmbedType {
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
export enum EmbedFlags {
export interface APIEmbedThumbnail {
/**
* This embed is a fallback for a reply to an activity card
* Source url of thumbnail (only supports http(s) and attachments)
*/
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
url: string;
/**
* This image is animated
* A proxied url of the thumbnail
*/
IsAnimated = 1 << 5,
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -740,33 +730,6 @@ 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;
}
/**
@@ -789,33 +752,6 @@ 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;
}
/**
@@ -918,7 +854,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description (alt text) for the file (max 1024 characters)
* Description for the file
*/
description?: string;
/**
@@ -940,27 +876,15 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image or video)
* Height of file (if image)
*/
height?: number | null;
/**
* Width of file (if image or video)
* Width of file (if image)
*/
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;
/**
@@ -975,48 +899,16 @@ 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://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-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,
}
/**
@@ -1590,9 +1482,6 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1605,78 +1494,37 @@ 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
*
* @remarks This field is ignored and provided by the API as part of the response.
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
*/
proxy_url?: string;
/**
* 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.
* The width of the media item. This field is ignored and provided by the API as part of the response
*/
width?: number | null;
/**
* 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.
* The height of the media item. 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
* The media type of the content. This field is ignored and provided by the API as part of the response
*
* @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;
/**
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* 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.
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
*/
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

@@ -56,7 +56,7 @@ export interface APITeamMember {
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
user: Pick<APIUser, 'avatar' | 'discriminator' | 'id' | 'username'>;
/**
* The user's role in the team.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
@@ -194,8 +194,6 @@ 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

@@ -86,7 +86,7 @@ export interface APIBaseMessageNoChannel {
*/
mention_channels?: APIChannelMention[];
/**
* Any attached files that are not referenced in embeds or components
* Any attached files
*
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*
@@ -612,9 +612,9 @@ export interface APIEmbed {
/**
* Thumbnail information
*
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
thumbnail?: APIEmbedImage;
thumbnail?: APIEmbedThumbnail;
/**
* Video information
*
@@ -641,13 +641,6 @@ 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;
}
/**
@@ -691,30 +684,27 @@ export enum EmbedType {
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
*/
export enum EmbedFlags {
export interface APIEmbedThumbnail {
/**
* This embed is a fallback for a reply to an activity card
* Source url of thumbnail (only supports http(s) and attachments)
*/
IsContentInventoryEntry = 1 << 5,
}
/**
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
*/
export enum EmbedMediaFlags {
url: string;
/**
* This image is animated
* A proxied url of the thumbnail
*/
IsAnimated = 1 << 5,
proxy_url?: string;
/**
* Height of thumbnail
*/
height?: number;
/**
* Width of thumbnail
*/
width?: number;
}
/**
* @deprecated Use {@link APIEmbedImage} instead.
*/
export interface APIEmbedThumbnail extends APIEmbedImage {}
/**
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
*/
@@ -735,33 +725,6 @@ 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;
}
/**
@@ -784,33 +747,6 @@ 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;
}
/**
@@ -913,7 +849,7 @@ export interface APIAttachment {
*/
title?: string;
/**
* Description (alt text) for the file (max 1024 characters)
* Description for the file
*/
description?: string;
/**
@@ -935,27 +871,15 @@ export interface APIAttachment {
*/
proxy_url: string;
/**
* Height of file (if image or video)
* Height of file (if image)
*/
height?: number | null;
/**
* Width of file (if image or video)
* Width of file (if image)
*/
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;
/**
@@ -970,48 +894,16 @@ 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://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-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,
}
/**
@@ -1585,9 +1477,6 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* @unstable This enum is currently not documented by Discord
*/
export enum UnfurledMediaItemLoadingState {
Unknown,
Loading,
@@ -1600,78 +1489,37 @@ 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
*
* @remarks This field is ignored and provided by the API as part of the response.
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
*/
proxy_url?: string;
/**
* 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.
* The width of the media item. This field is ignored and provided by the API as part of the response
*/
width?: number | null;
/**
* 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.
* The height of the media item. 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
* The media type of the content. This field is ignored and provided by the API as part of the response
*
* @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;
/**
* @unstable This field is currently not documented by Discord
*/
loading_state?: UnfurledMediaItemLoadingState;
flags?: number;
/**
* 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.
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
*/
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

@@ -56,7 +56,7 @@ export interface APITeamMember {
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
user: Pick<APIUser, 'avatar' | 'discriminator' | 'id' | 'username'>;
/**
* The user's role in the team.
*

View File

@@ -22,7 +22,7 @@ export interface APIUser {
*/
discriminator: string;
/**
* The user's display name, if it is set
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
@@ -194,8 +194,6 @@ 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

@@ -75,16 +75,8 @@ export enum RESTJSONErrorCodes {
UnderMinimumAge = 20_024,
ChannelWriteRateLimit = 20_028,
/**
* @deprecated Use {@link RESTJSONErrorCodes.ChannelWriteRateLimit} instead
*/
ChannelSendRateLimit = ChannelWriteRateLimit,
ServerWriteRateLimit = 20_029,
/**
* @deprecated Use {@link RESTJSONErrorCodes.ServerWriteRateLimit} instead
*/
ServerSendRateLimit = ServerWriteRateLimit,
ChannelSendRateLimit = 20_028,
ServerSendRateLimit,
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20_031,
@@ -309,8 +301,6 @@ export enum RESTJSONErrorCodes {
MaximumActiveThreads,
MaximumActiveAnnouncementThreads,
CannotForwardMessageWithUnreadableContent = 160_014,
InvalidJSONForUploadedLottieFile = 170_001,
UploadedLottiesCannotContainRasterizedImages,
StickerMaximumFramerateExceeded,

View File

@@ -411,13 +411,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
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
Super,
}
/**
@@ -752,10 +746,6 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
* 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;
};
/**

View File

@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
*/
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}

View File

@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
/**
* The recipient to open a DM channel with
*/
recipient_id: Snowflake;
recipient_id: string;
}
/**

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?: Snowflake;
thread_id?: string;
}
/**
@@ -309,13 +309,6 @@ 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,13 +418,7 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
*/
export enum ReactionType {
Normal,
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
Super,
}
/**
@@ -765,10 +759,6 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
* 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;
};
/**

View File

@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
*/
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
/**
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}

View File

@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
/**
* The recipient to open a DM channel with
*/
recipient_id: Snowflake;
recipient_id: string;
}
/**

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?: Snowflake;
thread_id?: string;
}
/**
@@ -309,13 +309,6 @@ 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

@@ -1 +1 @@
[{"entryPoints":{"v10":{"path":"v10.ts","label":"API v10"},"v9":{"path":"v9.ts","label":"API v9"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"voice/v8":{"path":"voice/v8.ts","label":"Voice v8"},"globals":{"path":"globals.ts","label":"Global Types"}},"packageRoot":"/home/runner/work/discord-api-types/discord-api-types/","packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.38.47"}]
[{"entryPoints":{"v10":{"path":"v10.ts","label":"API v10"},"v9":{"path":"v9.ts","label":"API v9"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"voice/v8":{"path":"voice/v8.ts","label":"Voice v8"},"globals":{"path":"globals.ts","label":"Global Types"}},"packageRoot":"/home/runner/work/discord-api-types/discord-api-types/","packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.38.44"}]

View File

@@ -1,3 +1,3 @@
[
"0.38.47"
"0.38.44"
]

2668
yarn.lock

File diff suppressed because it is too large Load Diff