Fix string splitting regex to split on any whitespace

This commit is contained in:
Nathaniel Mason 2022-04-18 16:13:06 +01:00
parent 34115f41cf
commit 3fd6a893dd
1 changed files with 1 additions and 1 deletions

View File

@ -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;