You've already forked grok
send replies instead of plain msgs
This commit is contained in:
8
main.go
8
main.go
@@ -86,7 +86,13 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error {
|
|||||||
return fmt.Errorf("prompting: %w", err)
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("responding: %w", err)
|
return fmt.Errorf("responding: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user