From d8c86959f5697755f2ef5bdd2de87230ef33c120 Mon Sep 17 00:00:00 2001 From: bignutty <3515180-bignutty@users.noreply.gitlab.com> Date: Fri, 26 Jul 2024 03:40:06 +0200 Subject: [PATCH] abort emojimix early --- commands/interaction/slash/utils/emoji.js | 2 ++ commands/message/utils/emoji.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/commands/interaction/slash/utils/emoji.js b/commands/interaction/slash/utils/emoji.js index 2f01c7b..f90dc3a 100644 --- a/commands/interaction/slash/utils/emoji.js +++ b/commands/interaction/slash/utils/emoji.js @@ -98,6 +98,8 @@ module.exports = { // Emoji Mixing if(emoji.length >= 2){ ingest("emoji_emojikitchen", "slash_command_ran"); + if(emoji.length >= 3) return editOrReply(context, createEmbed("warning", context, "You cannot mix more than two emoji.")); + try{ let em = await emojiKitchen(emoji) if(!em.body.results[0]){ diff --git a/commands/message/utils/emoji.js b/commands/message/utils/emoji.js index d64f945..e02bee7 100644 --- a/commands/message/utils/emoji.js +++ b/commands/message/utils/emoji.js @@ -110,6 +110,8 @@ module.exports = { if(emoji.length >= 2){ try{ ingest("emoji_emojikitchen", "command_ran"); + if(emoji.length >= 3) return editOrReply(context, createEmbed("warning", context, "You cannot mix more than two emoji.")); + let em = await emojiKitchen(emoji) if(!em.body.results[0]){ for(const em of emoji){