mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(Constants): fix CDN endpoint typings (#6332)
This commit is contained in:
@@ -55,10 +55,10 @@ exports.Endpoints = {
|
||||
if (dynamic) format = hash.startsWith('a_') ? 'gif' : format;
|
||||
return makeImageUrl(`${root}/icons/${guildId}/${hash}`, { format, size });
|
||||
},
|
||||
AppIcon: (clientId, hash, { format = 'webp', size } = {}) =>
|
||||
makeImageUrl(`${root}/app-icons/${clientId}/${hash}`, { size, format }),
|
||||
AppAsset: (clientId, hash, { format = 'webp', size } = {}) =>
|
||||
makeImageUrl(`${root}/app-assets/${clientId}/${hash}`, { size, format }),
|
||||
AppIcon: (appId, hash, { format = 'webp', size } = {}) =>
|
||||
makeImageUrl(`${root}/app-icons/${appId}/${hash}`, { size, format }),
|
||||
AppAsset: (appId, hash, { format = 'webp', size } = {}) =>
|
||||
makeImageUrl(`${root}/app-assets/${appId}/${hash}`, { size, format }),
|
||||
StickerPackBanner: (bannerId, format = 'webp', size) =>
|
||||
makeImageUrl(`${root}/app-assets/710982414301790216/store/${bannerId}`, { size, format }),
|
||||
GDMIcon: (channelId, hash, format = 'webp', size) =>
|
||||
|
||||
49
typings/index.d.ts
vendored
49
typings/index.d.ts
vendored
@@ -2141,33 +2141,42 @@ export const Constants: {
|
||||
botGateway: string;
|
||||
invite: (root: string, code: string) => string;
|
||||
CDN: (root: string) => {
|
||||
Asset: (name: string) => string;
|
||||
DefaultAvatar: (id: Snowflake | number) => string;
|
||||
Emoji: (emojiId: Snowflake, format: DynamicImageFormat) => string;
|
||||
Avatar: (userId: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize) => string;
|
||||
Banner: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Icon: (userId: Snowflake | number, hash: string, format: DynamicImageFormat, size: AllowedImageSize) => string;
|
||||
AppIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
AppAsset: (
|
||||
userId: Snowflake | number,
|
||||
Asset: (name: string) => string;
|
||||
DefaultAvatar: (discriminator: number) => string;
|
||||
Avatar: (
|
||||
userId: Snowflake,
|
||||
hash: string,
|
||||
format: AllowedImageFormat,
|
||||
format: DynamicImageFormat,
|
||||
size: AllowedImageSize,
|
||||
dynamic: boolean,
|
||||
) => string;
|
||||
Banner: (guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Icon: (
|
||||
guildId: Snowflake,
|
||||
hash: string,
|
||||
format: DynamicImageFormat,
|
||||
size: AllowedImageSize,
|
||||
dynamic: boolean,
|
||||
) => string;
|
||||
AppIcon: (
|
||||
appId: Snowflake,
|
||||
hash: string,
|
||||
{ format, size }: { format: AllowedImageFormat; size: AllowedImageSize },
|
||||
) => string;
|
||||
AppAsset: (
|
||||
appId: Snowflake,
|
||||
hash: string,
|
||||
{ format, size }: { format: AllowedImageFormat; size: AllowedImageSize },
|
||||
) => string;
|
||||
StickerPackBanner: (bannerId: Snowflake, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
GDMIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Splash: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
DiscoverySplash: (
|
||||
guildId: Snowflake | number,
|
||||
hash: string,
|
||||
format: AllowedImageFormat,
|
||||
size: AllowedImageSize,
|
||||
) => string;
|
||||
GDMIcon: (channelId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Splash: (guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
DiscoverySplash: (guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
TeamIcon: (
|
||||
teamId: Snowflake | number,
|
||||
teamId: Snowflake,
|
||||
hash: string,
|
||||
format: AllowedImageFormat,
|
||||
size: AllowedImageSize,
|
||||
{ format, size }: { format: AllowedImageFormat; size: AllowedImageSize },
|
||||
) => string;
|
||||
Sticker: (stickerId: Snowflake, stickerFormat: StickerFormatType) => string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user