Fixed error thrown when getArgs called on a command with no arguments

This commit is contained in:
Andrei 2025-01-23 13:52:32 -06:00
parent edb7836e55
commit 5c34ed7286

View File

@ -38,7 +38,7 @@ class ChatService extends BaseService {
public getArgs(command: string, message: string): string[] | undefined { public getArgs(command: string, message: string): string[] | undefined {
if (!this.isCommand(message, command)) return if (!this.isCommand(message, command)) return
return message.split(`/${command} `)[1].split(' ') return message.slice(`/${command} `.length).split(' ')
} }
} }