all repos — telegram-bot-api @ 88e1a77b954d0018eb9b0dd673a5549f61d2c285

Golang bindings for the Telegram Bot API

Update helpers.go

added a function with name `NewEditMessageTextAndMarkup`
for edit text and replymarkup together
Mohammad Taha mohammadtaharabie@gmail.com
Wed, 19 Jun 2019 08:44:38 +0430
commit

88e1a77b954d0018eb9b0dd673a5549f61d2c285

parent

cea05bfc443c89b43d5fa0ddd28eeb15dfe20639

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M helpers.gohelpers.go

@@ -615,6 +615,18 @@ Text: text,

} } +// NewEditMessageTextAndMarkup allows you to edit the text and replymarkup of a message. +func NewEditMessageTextAndMarkup(chatID int64, messageID int, text string, replyMarkup InlineKeyboardMarkup) EditMessageTextConfig { + return EditMessageTextConfig{ + BaseEdit: BaseEdit{ + ChatID: chatID, + MessageID: messageID, + ReplyMarkup: &replyMarkup, + }, + Text: text, + } +} + // NewEditMessageCaption allows you to edit the caption of a message. func NewEditMessageCaption(chatID int64, messageID int, caption string) EditMessageCaptionConfig { return EditMessageCaptionConfig{

@@ -622,7 +634,7 @@ BaseEdit: BaseEdit{

ChatID: chatID, MessageID: messageID, }, - Caption: caption, + Caption: caption, } }