3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

Fix starboard and spam plugins not detecting animated emoji

This commit is contained in:
Dragory 2019-01-06 12:30:52 +02:00
parent 5b800bb443
commit dced441d09
2 changed files with 7 additions and 5 deletions

View file

@ -99,9 +99,11 @@ export class StarboardPlugin extends ZeppelinPlugin {
}
emoji = allEmojis[0];
if (emoji.match(customEmojiRegex)) {
const customEmojiMatch = emoji.match(customEmojiRegex);
if (customEmojiMatch) {
// <:name:id> to name:id, as Eris puts them in the message reactions object
emoji = emoji.substr(2, emoji.length - 1);
emoji = `${customEmojiMatch[1]}:${customEmojiMatch[2]}`;
}
} while (emoji == null);