mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
422 B
Go
22 lines
422 B
Go
package telegram
|
|
|
|
import (
|
|
"context"
|
|
"net/url"
|
|
)
|
|
|
|
// AnswerCallbackQuery make an answerCallbackQuery api request.
|
|
func (b *Bot) AnswerCallbackQuery(ctx context.Context, callbackQueryID, text string) error {
|
|
formData := url.Values{
|
|
"callback_query_id": {callbackQueryID},
|
|
"text": {text},
|
|
}
|
|
|
|
err := b.postForm(ctx, "/answerCallbackQuery", formData, nil)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|