utility.jumbo: fix custom emotes

This commit is contained in:
Cynthia Foxwell 2021-08-11 21:33:58 -06:00
parent be5e820807
commit 24f18d44ad

View file

@ -55,7 +55,7 @@ EMOJI_SETS.ms = EMOJI_SETS.mustd;
EMOJI_SETS.twitter = EMOJI_SETS.twemoji;
EMOJI_SETS.fb = EMOJI_SETS.facebook;
const CUSTOM_EMOTE_REGEX = /^<(?:\u200b|&)?(a)?:(\w+):(\d+)>/;
const CUSTOM_EMOTE_REGEX = /<(?:\u200b|&)?(a)?:(\w+):(\d+)>/;
const fetch = require("node-fetch");
const sharp = require("sharp");
@ -438,7 +438,7 @@ jumbo.addAlias("emote");
jumbo.addAlias("emoji");
jumbo.callback = async function (msg, line) {
if (CUSTOM_EMOTE_REGEX.test(line)) {
const [_, __, animatedFlag, name, id] = line.match(CUSTOM_EMOTE_REGEX);
const [_, animatedFlag, name, id] = line.match(CUSTOM_EMOTE_REGEX);
const animated = animatedFlag === "a";
return {