fix command parsing

This commit is contained in:
Aine
2022-09-07 23:51:37 +03:00
parent 715ec1ef2a
commit 40f2ec9492

View File

@@ -196,7 +196,7 @@ func (b *Bot) parseCommand(message string, toLower bool) []string {
if toLower { if toLower {
message = strings.ToLower(message) message = strings.ToLower(message)
} }
return strings.Split(message, " ") return strings.Split(strings.TrimSpace(message), " ")
} }
func (b *Bot) sendIntroduction(ctx context.Context, roomID id.RoomID) { func (b *Bot) sendIntroduction(ctx context.Context, roomID id.RoomID) {