From 40f2ec949273eba56e5ac0fcc92358f3383fc021 Mon Sep 17 00:00:00 2001 From: Aine Date: Wed, 7 Sep 2022 23:51:37 +0300 Subject: [PATCH] fix command parsing --- bot/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/command.go b/bot/command.go index 8c9bfd6..f45301f 100644 --- a/bot/command.go +++ b/bot/command.go @@ -196,7 +196,7 @@ func (b *Bot) parseCommand(message string, toLower bool) []string { if toLower { message = strings.ToLower(message) } - return strings.Split(message, " ") + return strings.Split(strings.TrimSpace(message), " ") } func (b *Bot) sendIntroduction(ctx context.Context, roomID id.RoomID) {