Add some of the new methods and types.
This commit is contained in:
parent
5c46b08c56
commit
18510df3c9
3 changed files with 153 additions and 40 deletions
15
bot.go
15
bot.go
|
@ -482,8 +482,23 @@ func (bot *BotAPI) AnswerInlineQuery(config InlineConfig) (APIResponse, error) {
|
|||
return APIResponse{}, err
|
||||
}
|
||||
v.Add("results", string(data))
|
||||
v.Add("switch_pm_text", config.SwitchPMText)
|
||||
v.Add("switch_pm_parameter", config.SwitchPMParameter)
|
||||
|
||||
bot.debugLog("answerInlineQuery", v, nil)
|
||||
|
||||
return bot.MakeRequest("answerInlineQuery", v)
|
||||
}
|
||||
|
||||
// AnswerCallbackQuery sends a response to an inline query callback.
|
||||
func (bot *BotAPI) AnswerCallbackQuery(config CallbackConfig) (APIResponse, error) {
|
||||
v := url.Values{}
|
||||
|
||||
v.Add("callback_query_id", config.CallbackQueryID)
|
||||
v.Add("text", config.Text)
|
||||
v.Add("show_alert", strconv.FormatBool(config.ShowAlert))
|
||||
|
||||
bot.debugLog("answerCallbackQuery", v, nil)
|
||||
|
||||
return bot.MakeRequest("answerCallbackQuery", v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue