Fix string splitting regex to split on any whitespace
This commit is contained in:
parent
34115f41cf
commit
3fd6a893dd
2
start.js
2
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;
|
||||
|
|
Reference in New Issue