From f583b9ff009cb3cf23141f9753ade72de40e3c8f Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 20:16:06 -0500 Subject: [PATCH] Use parseInt() to convert string to integer --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c01458d..6b452d9 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ client.on("message", message => { }); async function bulkDelete(message) { - const amount = message.content.substring(12); + const amount = Integer.parseInt(message.content.substring(12)); if (!amount) { message.reply('please add the number of messages to be deleted!');