From c4f7374a515012297ebb48a1a30bd34f46aff13f Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 19:56:20 -0500 Subject: [PATCH] Use substring instead of slice --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 6ee347c..f0e9754 100644 --- a/index.js +++ b/index.js @@ -21,8 +21,7 @@ client.on("message", message => { }); async function bulkDelete(message) { - const args = message.content.split(' ').slice(1); - const amount = args.join(' '); + const amount = message.content.substring(0, 12); if (!amount) { message.reply('please add the number of messages to be deleted!');