mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-08-29 07:08:50 +00:00
Trim command arguments too for accessory spaces
This commit is contained in:
@@ -41,7 +41,7 @@ export const COMMAND_PREFIX = "!mjolnir";
|
||||
|
||||
export async function handleCommand(roomId: string, event: any, mjolnir: Mjolnir) {
|
||||
const cmd = event['content']['body'];
|
||||
const parts = cmd.trim().split(' ');
|
||||
const parts = cmd.trim().split(' ').filter(p => p.trim().length > 0);
|
||||
|
||||
try {
|
||||
if (parts.length === 1 || parts[1] === 'status') {
|
||||
|
||||
Reference in New Issue
Block a user