diff --git a/main.go b/main.go index 3e1787d..7781981 100644 --- a/main.go +++ b/main.go @@ -73,11 +73,11 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { } chatID := msg.Chat.ID - if chatID != a.config.ChatID || !strings.HasPrefix(msg.Text, "@grok") { + if chatID != a.config.ChatID || !strings.HasPrefix(msg.Text, "@grok ") { return nil } - question := msg.Text[len("@grok"):] + question := msg.Text[len("@grok "):] select { case a.sema <- struct{}{}: @@ -122,7 +122,7 @@ func (a *App) HandleUpdates(ctx context.Context) error { } if upd.Message != nil { - a.log.Info("new message", "chat", upd.Message.Chat) + a.log.Info("new message", "update", upd) go func() { if err := a.handleMessage(ctx, upd.Message); err != nil { a.log.Error("handling message", "msg", upd.Message, "err", err)