Fixed command parse error

This commit is contained in:
BordedDev 2025-04-10 09:52:29 +02:00
parent e5e65d4701
commit 1e285cc029
No known key found for this signature in database
GPG Key ID: C5F495EAE56673BF

View File

@ -55,7 +55,7 @@ export class ImgGenHandler extends BaseHandler {
return return
} }
const [[_, command, rest]] = newMessage.matchAll(/^(\w+)\s*(.*)$/gs) const [[_, command, rest]] = newMessage.matchAll(/^(\S+)\s*(.*)$/gs)
if (command in this.#subCommands) { if (command in this.#subCommands) {
this.#subCommands[command]?.(rest.trim(), message, bot) this.#subCommands[command]?.(rest.trim(), message, bot)