mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +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 }),
|
||||
TeamIcon: (teamId, hash, options) => makeImageUrl(`${root}/team-icons/${teamId}/${hash}`, options),
|
||||
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) =>
|
||||
makeImageUrl(`${root}/role-icons/${roleId}/${hash}`, { size, format }),
|
||||
guildScheduledEventCover: (scheduledEventId, coverHash, format, size) =>
|
||||
@@ -1199,10 +1201,11 @@ exports.StickerTypes = createEnum([null, 'STANDARD', 'GUILD']);
|
||||
* * PNG
|
||||
* * APNG
|
||||
* * LOTTIE
|
||||
* * GIF
|
||||
* @typedef {string} StickerFormatType
|
||||
* @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:
|
||||
|
||||
1
typings/enums.d.ts
vendored
1
typings/enums.d.ts
vendored
@@ -223,6 +223,7 @@ export const enum StickerFormatTypes {
|
||||
PNG = 1,
|
||||
APNG = 2,
|
||||
LOTTIE = 3,
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export const enum StickerTypes {
|
||||
|
||||
Reference in New Issue
Block a user