mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
feat: add support for gif stickers (v13) (#9158)
* update new sticker file type * update * lint
This commit is contained in:
@@ -96,7 +96,9 @@ exports.Endpoints = {
|
|||||||
makeImageUrl(`${root}/discovery-splashes/${guildId}/${hash}`, { size, format }),
|
makeImageUrl(`${root}/discovery-splashes/${guildId}/${hash}`, { size, format }),
|
||||||
TeamIcon: (teamId, hash, options) => makeImageUrl(`${root}/team-icons/${teamId}/${hash}`, options),
|
TeamIcon: (teamId, hash, options) => makeImageUrl(`${root}/team-icons/${teamId}/${hash}`, options),
|
||||||
Sticker: (stickerId, stickerFormat) =>
|
Sticker: (stickerId, stickerFormat) =>
|
||||||
`${root}/stickers/${stickerId}.${stickerFormat === 'LOTTIE' ? 'json' : 'png'}`,
|
`${root}/stickers/${stickerId}.${
|
||||||
|
stickerFormat === 'LOTTIE' ? 'json' : stickerFormat === 'GIF' ? 'gif' : 'png'
|
||||||
|
}`,
|
||||||
RoleIcon: (roleId, hash, format = 'webp', size) =>
|
RoleIcon: (roleId, hash, format = 'webp', size) =>
|
||||||
makeImageUrl(`${root}/role-icons/${roleId}/${hash}`, { size, format }),
|
makeImageUrl(`${root}/role-icons/${roleId}/${hash}`, { size, format }),
|
||||||
guildScheduledEventCover: (scheduledEventId, coverHash, format, size) =>
|
guildScheduledEventCover: (scheduledEventId, coverHash, format, size) =>
|
||||||
@@ -1199,10 +1201,11 @@ exports.StickerTypes = createEnum([null, 'STANDARD', 'GUILD']);
|
|||||||
* * PNG
|
* * PNG
|
||||||
* * APNG
|
* * APNG
|
||||||
* * LOTTIE
|
* * LOTTIE
|
||||||
|
* * GIF
|
||||||
* @typedef {string} StickerFormatType
|
* @typedef {string} StickerFormatType
|
||||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
|
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
|
||||||
*/
|
*/
|
||||||
exports.StickerFormatTypes = createEnum([null, 'PNG', 'APNG', 'LOTTIE']);
|
exports.StickerFormatTypes = createEnum([null, 'PNG', 'APNG', 'LOTTIE', 'GIF']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An overwrite type:
|
* An overwrite type:
|
||||||
|
|||||||
1
typings/enums.d.ts
vendored
1
typings/enums.d.ts
vendored
@@ -223,6 +223,7 @@ export const enum StickerFormatTypes {
|
|||||||
PNG = 1,
|
PNG = 1,
|
||||||
APNG = 2,
|
APNG = 2,
|
||||||
LOTTIE = 3,
|
LOTTIE = 3,
|
||||||
|
GIF = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum StickerTypes {
|
export const enum StickerTypes {
|
||||||
|
|||||||
Reference in New Issue
Block a user