From 826d13eadd47a23a4221b7c3c086072f767030c3 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 14 Jan 2022 20:05:50 +0100 Subject: [PATCH] Fix custom command Convert to string before sending message --- commands/misc/custom.js | 5 +++-- commands/misc/random.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/commands/misc/custom.js b/commands/misc/custom.js index 01869e2..04c34a0 100644 --- a/commands/misc/custom.js +++ b/commands/misc/custom.js @@ -23,10 +23,11 @@ module.exports = { fs.writeFileSync(customPath,"[]") } let sendText; + let isEmbed = false; if (args){ let customName = args[1]; let customMessage = args.slice(2, args.length).join(" "); - const isEmbed = false; + switch (args[0].toLowerCase()) { case "add": if(!customMessage) { @@ -85,7 +86,7 @@ module.exports = { break; } } - if(isEmbed) message.channeel.send({embeds :[sendText]}) + if(isEmbed) message.channel.send({embeds :[sendText]}) else message.channel.send(sendText); } }; \ No newline at end of file diff --git a/commands/misc/random.js b/commands/misc/random.js index 5e788f9..532fd60 100644 --- a/commands/misc/random.js +++ b/commands/misc/random.js @@ -11,6 +11,7 @@ module.exports = { max = parseInt(args[1]) } let randNumber= randomNumber(min,max) - message.channel.send(randNumber) + console.log(randNumber) + message.channel.send(randNumber.toString()) } }; \ No newline at end of file