3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00

Prevent crash when using !!emoji with no args

This commit is contained in:
Usoka 2021-05-25 20:37:15 +12:00 committed by GitHub
parent 55b4e39b6e
commit 0a160218a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ export const EmojiInfoCmd = utilityCmd({
},
async run({ message, args, pluginData }) {
const emojiIdMatch = args.emoji.match(customEmojiRegex);
const emojiIdMatch = args.emoji?.match(customEmojiRegex);
if (!emojiIdMatch?.[2]) {
sendErrorMessage(pluginData, message.channel, "Emoji not found");
return;