From 3fd6a893dd1f9adb383f1268730da9e2b7a2fb2f Mon Sep 17 00:00:00 2001 From: Nathaniel Mason Date: Mon, 18 Apr 2022 16:13:06 +0100 Subject: [PATCH] Fix string splitting regex to split on any whitespace --- start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.js b/start.js index 9dfde1a..6e59e37 100755 --- a/start.js +++ b/start.js @@ -55,7 +55,7 @@ client.on('message', async (message) => { if (!message.content.startsWith(config.prefix) || message.author.bot) return; - const args = message.content.slice(config.prefix.length).split(/ +/); + const args = message.content.slice(config.prefix.length).split(/\s+/); const command = args.shift().toLowerCase(); if (!client.commands.has(command)) return;