feat(bot): implement deleteMessage method

This commit is contained in:
Mohamad Jahani 2017-06-08 14:02:05 +04:30
parent 79b26b07c5
commit bdb0f1f4c5
3 changed files with 50 additions and 0 deletions

12
bot.go
View file

@ -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)
}