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 {
|
||||
const 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 url = CDN_URL + `/${twemoji.convert.toCodePoint(args.emoji)}.svg`;
|
||||
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 = {
|
||||
name: `emoji.png`,
|
||||
file: image,
|
||||
|
|
Loading…
Add table
Reference in a new issue