diff --git a/main.go b/main.go index 0a181d8..f3250ad 100644 --- a/main.go +++ b/main.go @@ -86,7 +86,13 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { return fmt.Errorf("prompting: %w", err) } - _, err = a.bot.Send(tgbotapi.NewMessage(chatID, response.Text)) + _, err = a.bot.Send(tgbotapi.MessageConfig{ + BaseChat: tgbotapi.BaseChat{ + ChatID: chatID, + ReplyToMessageID: msg.MessageID, + }, + Text: response.Text, + }) if err != nil { return fmt.Errorf("responding: %w", err) }