From 67bb6309b850d16a4369242900ad12706c5f9a6d Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 29 Nov 2022 19:18:37 +0200 Subject: [PATCH] split string by whitespace (\s+) instead of ' ' --- structure/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/Client.js b/structure/Client.js index 9a6c83b..a3b6d8d 100644 --- a/structure/Client.js +++ b/structure/Client.js @@ -102,7 +102,7 @@ class ModmailClient extends Client { const roles = member.roles.cache.map((r) => r.id); 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 command = this.registry.find(commandName); if (!command) return;