parent
63cbbdc63c
commit
1059fc759d
|
@ -1241,6 +1241,7 @@ type PreCheckoutConfig struct {
|
||||||
|
|
||||||
// DeleteMessageConfig contains information of a message in a chat to delete.
|
// DeleteMessageConfig contains information of a message in a chat to delete.
|
||||||
type DeleteMessageConfig struct {
|
type DeleteMessageConfig struct {
|
||||||
|
ChannelUsername string
|
||||||
ChatID int64
|
ChatID int64
|
||||||
MessageID int
|
MessageID int
|
||||||
}
|
}
|
||||||
|
@ -1252,7 +1253,7 @@ func (config DeleteMessageConfig) method() string {
|
||||||
func (config DeleteMessageConfig) params() (Params, error) {
|
func (config DeleteMessageConfig) params() (Params, error) {
|
||||||
params := make(Params)
|
params := make(Params)
|
||||||
|
|
||||||
params.AddNonZero64("chat_id", config.ChatID)
|
params.AddFirstValid("chat_id", config.ChatID, config.ChannelUsername)
|
||||||
params.AddNonZero("message_id", config.MessageID)
|
params.AddNonZero("message_id", config.MessageID)
|
||||||
|
|
||||||
return params, nil
|
return params, nil
|
||||||
|
|
Loading…
Reference in New Issue