all repos — telegram-bot-api @ 1059fc759ddd50b5380daa671bd34544302fd62d

Golang bindings for the Telegram Bot API

Delete a message in a channel

(cherry picked from commit 86a3d94b4ba4e5318466cd56f738d18ca039fcdb)
ros-tel vladvladow@yandex.ru
Sun, 19 Jul 2020 10:11:27 +0500
commit

1059fc759ddd50b5380daa671bd34544302fd62d

parent

63cbbdc63c09713ecb0d449236568b7fa18e4e6d

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M configs.goconfigs.go

@@ -1241,8 +1241,9 @@ }

// DeleteMessageConfig contains information of a message in a chat to delete. type DeleteMessageConfig struct { - ChatID int64 - MessageID int + ChannelUsername string + ChatID int64 + MessageID int } func (config DeleteMessageConfig) method() string {

@@ -1252,7 +1253,7 @@

func (config DeleteMessageConfig) params() (Params, error) { params := make(Params) - params.AddNonZero64("chat_id", config.ChatID) + params.AddFirstValid("chat_id", config.ChatID, config.ChannelUsername) params.AddNonZero("message_id", config.MessageID) return params, nil