From bab5bae27956dfe8bea1c1b3b8600abe92058855 Mon Sep 17 00:00:00 2001 From: Alexander Goncharov Date: Sun, 1 Feb 2026 14:39:28 +0300 Subject: [PATCH] send replies instead of plain msgs --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) }