forked from cadence/out-of-your-element
support d->m stickers
This commit is contained in:
parent
584f19a011
commit
740ddc36d1
7 changed files with 67 additions and 18 deletions
|
@ -83,10 +83,11 @@ function emoji(emojiID, animated) {
|
|||
const stickerFormat = new Map([
|
||||
[1, {label: "PNG", ext: "png", mime: "image/png"}],
|
||||
[2, {label: "APNG", ext: "png", mime: "image/apng"}],
|
||||
[3, {label: "LOTTIE", ext: "json", mime: "application/json"}],
|
||||
[3, {label: "LOTTIE", ext: "json", mime: null}],
|
||||
[4, {label: "GIF", ext: "gif", mime: "image/gif"}]
|
||||
])
|
||||
|
||||
/** @param {{id: string, format_type: number}} sticker */
|
||||
function sticker(sticker) {
|
||||
const format = stickerFormat.get(sticker.format_type)
|
||||
if (!format) throw new Error(`No such format ${sticker.format_type} for sticker ${JSON.stringify(sticker)}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue