mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 22:21:51 +00:00
fixed default emotes for jumbo
This commit is contained in:
parent
58e99bad33
commit
c4d6556fe4
1 changed files with 10 additions and 2 deletions
|
@ -1509,8 +1509,16 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const url = CDN_URL + `/${twemoji.convert.toCodePoint(args.emoji)}.svg`;
|
let url = CDN_URL + `/${twemoji.convert.toCodePoint(args.emoji)}.svg`;
|
||||||
const image = await this.resizeBuffer(await this.getBufferFromUrl(url), config.jumbo_size, config.jumbo_size);
|
let image;
|
||||||
|
try {
|
||||||
|
image = await this.resizeBuffer(await this.getBufferFromUrl(url), config.jumbo_size, config.jumbo_size);
|
||||||
|
} catch {
|
||||||
|
if (url.toLocaleLowerCase().endsWith("fe0f.svg")) {
|
||||||
|
url = url.slice(0, url.lastIndexOf("-fe0f")) + ".svg";
|
||||||
|
image = await this.resizeBuffer(await this.getBufferFromUrl(url), config.jumbo_size, config.jumbo_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
file = {
|
file = {
|
||||||
name: `emoji.png`,
|
name: `emoji.png`,
|
||||||
file: image,
|
file: image,
|
||||||
|
|
Loading…
Add table
Reference in a new issue