all repos — telegram-bot-api @ 4f6c0f14db51526d7cb0e368c2e1ffe05ab19a45

Golang bindings for the Telegram Bot API

add MarkdownV2

(cherry picked from commit dc71b50b19cb81acc603a6ef671714d017d6b333)
an.groshev an.groshev@tensor.ru
Wed, 01 Jul 2020 20:03:05 +0300
commit

4f6c0f14db51526d7cb0e368c2e1ffe05ab19a45

parent

50bcf10f7e611e05a1d8388d026404783ec5722f

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

jump to
M helpers.gohelpers.go

@@ -469,6 +469,19 @@ },

} } +// NewInlineQueryResultArticleMarkdownV2 creates a new inline query article with MarkdownV2 parsing. +func NewInlineQueryResultArticleMarkdownV2(id, title, messageText string) InlineQueryResultArticle { + return InlineQueryResultArticle{ + Type: "article", + ID: id, + Title: title, + InputMessageContent: InputTextMessageContent{ + Text: messageText, + ParseMode: "MarkdownV2", + }, + } +} + // NewInlineQueryResultArticleHTML creates a new inline query article with HTML parsing. func NewInlineQueryResultArticleHTML(id, title, messageText string) InlineQueryResultArticle { return InlineQueryResultArticle{