feat(bot): implement deleteMessage method
This commit is contained in:
parent
79b26b07c5
commit
bdb0f1f4c5
3 changed files with 50 additions and 0 deletions
12
bot.go
12
bot.go
|
@ -740,3 +740,15 @@ func (bot *BotAPI) AnswerPreCheckoutQuery(config PreCheckoutConfig) (APIResponse
|
|||
|
||||
return bot.MakeRequest("answerPreCheckoutQuery", v)
|
||||
}
|
||||
|
||||
// DeleteMessage deletes a message in a chat
|
||||
func (bot *BotAPI) DeleteMessage(config DeleteMessageConfig) (APIResponse, error) {
|
||||
v, err := config.values()
|
||||
if err != nil {
|
||||
return APIResponse{}, err
|
||||
}
|
||||
|
||||
bot.debugLog(config.method(), v, nil)
|
||||
|
||||
return bot.MakeRequest(config.method(), v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue