From a38e166cb8ba036f15cd5b75baf1e4c781a0769c Mon Sep 17 00:00:00 2001 From: AliMVP Date: Mon, 30 Jul 2018 22:02:21 +0430 Subject: [PATCH] - Test EditMessage Media --- configs.go | 11 +++++++++++ helpers.go | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/configs.go b/configs.go index dd955ff..8c9c820 100644 --- a/configs.go +++ b/configs.go @@ -1218,6 +1218,17 @@ type InputMediaPhoto struct { ParseMode string `json:"parse_mode"` } +type InputMediaAudio struct { + Type string `json:"type"` + Media string `json:"media"` + Thumb string `json:"thumb,-"` + Caption string `json:"caption,-"` + ParseMode string `json:"parse_mode,-"` + Duration int `json:"duration,-"` + Performer string `json:"duration,-"` + Title string `json:"title,-"` +} + type InputMediaVideo struct { Type string `json:"type"` Media string `json:"media"` diff --git a/helpers.go b/helpers.go index db18c1e..d6be102 100644 --- a/helpers.go +++ b/helpers.go @@ -515,14 +515,14 @@ func NewEditMessageCaption(chatID int64, messageID int, caption string) EditMess } } -// NewEditMessageText allows you to edit the text of a message. -func NewEditMessageMedia(chatID int64, messageID int, text string) EditMessageTextConfig { - return EditMessageTextConfig{ +// NewEditMessageMedia allows you to edit the media of a message. +func NewEditMessageMedia(chatID int64, messageID int, media interface{}) EditMessageMediaConfig { + return EditMessageMediaConfig{ BaseEdit: BaseEdit{ ChatID: chatID, MessageID: messageID, }, - Text: text, + Media: media, } }