From 4f6c0f14db51526d7cb0e368c2e1ffe05ab19a45 Mon Sep 17 00:00:00 2001 From: "an.groshev" Date: Wed, 1 Jul 2020 20:03:05 +0300 Subject: [PATCH] add MarkdownV2 (cherry picked from commit dc71b50b19cb81acc603a6ef671714d017d6b333) --- helpers.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/helpers.go b/helpers.go index 2d9c8e8..a652d53 100644 --- a/helpers.go +++ b/helpers.go @@ -469,6 +469,19 @@ func NewInlineQueryResultArticleMarkdown(id, title, messageText string) InlineQu } } +// 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{