From b0eff87e72b8d9b2c1af46b7a74a1dd9b96a6a44 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Fri, 20 Nov 2020 21:56:16 +0530 Subject: [PATCH] Fix untested code with more untested code --- commands/insult.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/insult.js b/commands/insult.js index 45feaf2..e16b2f9 100644 --- a/commands/insult.js +++ b/commands/insult.js @@ -10,10 +10,10 @@ module.exports = (random, kys, default_text, bot_text, excluded_names) => (ctx) } else { - const text_array = ctx.message.text.split(" ").trim(); + const text_array = ctx.message.text.split(" "); if (text_array.length > 1) { - const name = text_array.slice(1).reduce((i, j) => i + " " + j); + const name = text_array.slice(1).reduce((i, j) => i + " " + j).trim(); if (excluded_names.includes(name) || excluded_names.includes("@" + name)) return bot_text;