mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-28 06:20:11 +00:00
feat: user guild tags (#1287)
This commit is contained in:
31
deno/payloads/v10/user.ts
generated
31
deno/payloads/v10/user.ts
generated
@@ -102,6 +102,12 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,3 +413,28 @@ export enum NameplatePalette {
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
31
deno/payloads/v9/user.ts
generated
31
deno/payloads/v9/user.ts
generated
@@ -102,6 +102,12 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,3 +413,28 @@ export enum NameplatePalette {
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
11
deno/rest/v10/mod.ts
generated
11
deno/rest/v10/mod.ts
generated
@@ -1403,6 +1403,16 @@ export const CDNRoutes = {
|
||||
soundboardSound(soundId: Snowflake) {
|
||||
return `/soundboard-sounds/${soundId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/clan-badges/{guild.id}/{badge}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
|
||||
return `/clan-badges/${guildId}/${guildTagBadge}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
@@ -1449,6 +1459,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link DefaultUserAvatarFormat} instead.
|
||||
|
||||
11
deno/rest/v9/mod.ts
generated
11
deno/rest/v9/mod.ts
generated
@@ -1412,6 +1412,16 @@ export const CDNRoutes = {
|
||||
soundboardSound(soundId: Snowflake) {
|
||||
return `/soundboard-sounds/${soundId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/clan-badges/{guild.id}/{badge}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
|
||||
return `/clan-badges/${guildId}/${guildTagBadge}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
@@ -1458,6 +1468,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link DefaultUserAvatarFormat} instead.
|
||||
|
||||
@@ -102,6 +102,12 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,3 +413,28 @@ export enum NameplatePalette {
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,12 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,3 +413,28 @@ export enum NameplatePalette {
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
@@ -1403,6 +1403,16 @@ export const CDNRoutes = {
|
||||
soundboardSound(soundId: Snowflake) {
|
||||
return `/soundboard-sounds/${soundId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/clan-badges/{guild.id}/{badge}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
|
||||
return `/clan-badges/${guildId}/${guildTagBadge}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
@@ -1449,6 +1459,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link DefaultUserAvatarFormat} instead.
|
||||
|
||||
@@ -1412,6 +1412,16 @@ export const CDNRoutes = {
|
||||
soundboardSound(soundId: Snowflake) {
|
||||
return `/soundboard-sounds/${soundId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/clan-badges/{guild.id}/{badge}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
|
||||
return `/clan-badges/${guildId}/${guildTagBadge}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
@@ -1458,6 +1468,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link DefaultUserAvatarFormat} instead.
|
||||
|
||||
Reference in New Issue
Block a user