Separate args with any whitespace
This commit is contained in:
parent
cc82d32840
commit
b3d3df2cb7
1 changed files with 2 additions and 2 deletions
|
@ -60,9 +60,9 @@ module.exports = async (client, message) => {
|
|||
const replace = isMention ? `@${client.user.username} ` : prefix;
|
||||
const content = message.cleanContent.substring(replace.length).trim();
|
||||
const rawContent = message.content.substring(prefix.length).trim();
|
||||
const args = content.split(/ +/g);
|
||||
const args = content.split(/\s+/g);
|
||||
args.shift();
|
||||
const command = rawContent.split(/ +/g).shift().toLowerCase();
|
||||
const command = rawContent.split(/\s+/g).shift().toLowerCase();
|
||||
|
||||
// don't run if message is in a disabled channel
|
||||
if (message.channel.guild) {
|
||||
|
|
Loading…
Reference in a new issue