3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

AutoReactions: fix invalid custom emoji check

This commit is contained in:
Dragory 2019-01-12 16:03:27 +02:00
parent f8e0768ee2
commit 052b580a38

View file

@ -61,13 +61,13 @@ export class AutoReactions extends Plugin {
const customEmojiMatch = reaction.match(customEmojiRegex); const customEmojiMatch = reaction.match(customEmojiRegex);
if (customEmojiMatch) { if (customEmojiMatch) {
// Custom emoji // Custom emoji
if (!guildEmojiIds.includes(customEmojiMatch[0])) { if (!guildEmojiIds.includes(customEmojiMatch[1])) {
msg.channel.createMessage(errorMessage("I can only use regular emojis and custom emojis from this server")); msg.channel.createMessage(errorMessage("I can only use regular emojis and custom emojis from this server"));
return; return;
} }
savedValue = `${customEmojiMatch[0]}:${customEmojiMatch[1]}`; savedValue = `${customEmojiMatch[1]}:${customEmojiMatch[2]}`;
} else { } else {
// Unicode emoji // Unicode emoji
savedValue = reaction; savedValue = reaction;