From 77ace4109f9784b3e4305b5f424aa215466e230c Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 25 Nov 2021 13:29:34 +0100 Subject: [PATCH] Changed some stuff in reason section of ban --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ef17db1..e84774e 100644 --- a/index.js +++ b/index.js @@ -191,9 +191,9 @@ client.on("interactionCreate", (int) => { var mem = int.guild.members.cache.get(int.user.id); if(!mem.permissions.has("BAN_MEMBERS")) return int.reply(":x: You do not have the permissions to ban users."); var mem2 = int.guild.members.cache.get(int.options.getUser("user").id); - mem2.ban(int.options.getString("reason")).then(() => { - var reason = "No reason specified."; - if(int.options.getString("reason") !== null) reason = int.options.getString("reason"); + var reason = "No reason specified."; + if(int.options.getString("reason") !== null) reason = int.options.getString("reason"); + mem2.ban(reason).then(() => { int.reply("Successfully banned <@!" + int.options.getUser("user").id + "> with reason `" + reason + "`."); }).catch(e => { int.reply("An error occured with my code, please report this to " + Eco.tag + " or " + Helixu.tag + ": ```js\n" + e.stack + "```");