From 02500a4336d20fbd9378ebd06cf74c5fc1cdf366 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 19 Mar 2024 23:52:24 -0400 Subject: [PATCH] Fix reactIfAble --- util/Util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/Util.js b/util/Util.js index f9a53733..5eeee81c 100644 --- a/util/Util.js +++ b/util/Util.js @@ -283,6 +283,7 @@ module.exports = class Util { static async reactIfAble(msg, user, emoji, fallbackEmoji) { const dm = !msg.guild; + if (!emoji) emoji = fallbackEmoji; if (fallbackEmoji && (!dm && !msg.channel.permissionsFor(user).has('USE_EXTERNAL_EMOJIS'))) { emoji = fallbackEmoji; } @@ -326,7 +327,7 @@ module.exports = class Util { if (!num) return false; return num > 0 && num <= arr.length; }; - const msgs = await msg.channel.awaitMessages({ filter, max: 1, time }); + const msgs = await msg.channel.awaitMessages({ filter,max: 1, time }); if (!msgs.size) return defalt; return arr[Number.parseInt(msgs.first().content, 10) - 1]; }