mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-10-23 17:32:22 +00:00
Trim command arguments too for accessory spaces
This commit is contained in:
1 parent
7cb34f99b9
commit
7ee66a03dd
1 file changed
+1
-1
@@ -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