v0.3.6; answerCallbackQuery

This commit is contained in:
2026-02-03 14:51:57 +03:00
parent 0921d306fd
commit 90e2f38c18
4 changed files with 65 additions and 19 deletions

View File

@@ -138,3 +138,20 @@ func (b *Bot) DeleteMessage(params *DeleteMessageP) (bool, error) {
}
return *ok, err
}
type AnswerCallbackQueryP struct {
CallbackQueryID string `json:"callback_query_id"`
Text string `json:"text,omitempty"`
ShowAlert bool `json:"show_alert,omitempty"`
URL string `json:"url,omitempty"`
CacheTime int `json:"cache_time,omitempty"`
}
func (b *Bot) AnswerCallbackQuery(params *AnswerCallbackQueryP) (bool, error) {
req := NewRequest[bool]("answerCallbackQuery", params)
ok, err := req.Do(b)
if err != nil {
return false, err
}
return *ok, err
}