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

View file

@ -986,3 +986,22 @@ type PreCheckoutConfig struct {
OK bool // required
ErrorMessage string
}
// DeleteMessageConfig contains information of a message in a chat to delete.
type DeleteMessageConfig struct {
ChatID int64
MessageID int
}
func (config DeleteMessageConfig) method() string {
return "deleteMessage"
}
func (config DeleteMessageConfig) values() (url.Values, error) {
v := url.Values{}
v.Add("chat_id", strconv.FormatInt(config.ChatID, 10))
v.Add("message_id", strconv.Itoa(config.MessageID))
return v, nil
}