forked from Galactic/modmail
split string by whitespace (\s+) instead of ' '
This commit is contained in:
parent
a0e5b7fa3a
commit
67bb6309b8
@ -102,7 +102,7 @@ class ModmailClient extends Client {
|
|||||||
const roles = member.roles.cache.map((r) => r.id);
|
const roles = member.roles.cache.map((r) => r.id);
|
||||||
if (!roles.some((r) => this._options.staffRoles.includes(r)) && !member.hasPermission('ADMINISTRATOR')) return;
|
if (!roles.some((r) => this._options.staffRoles.includes(r)) && !member.hasPermission('ADMINISTRATOR')) return;
|
||||||
|
|
||||||
const [ rawCommand, ...args ] = content.split(' ');
|
const [ rawCommand, ...args ] = content.split(/\s+/u);
|
||||||
const commandName = rawCommand.substring(prefix.length);
|
const commandName = rawCommand.substring(prefix.length);
|
||||||
const command = this.registry.find(commandName);
|
const command = this.registry.find(commandName);
|
||||||
if (!command) return;
|
if (!command) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user