Rollback for backward compatibility, added NewInlineQueryResultArticleMarkdown and NewInlineQueryResultArticleHTML
This commit is contained in:
parent
0a1b57cdf9
commit
862c67342c
3 changed files with 121 additions and 5 deletions
29
helpers.go
29
helpers.go
|
@ -317,14 +317,39 @@ func NewWebhookWithCert(link string, file interface{}) WebhookConfig {
|
|||
}
|
||||
|
||||
// NewInlineQueryResultArticle creates a new inline query article.
|
||||
func NewInlineQueryResultArticle(id, title, messageText string, parseMode string) InlineQueryResultArticle {
|
||||
func NewInlineQueryResultArticle(id, title, messageText string) InlineQueryResultArticle {
|
||||
return InlineQueryResultArticle{
|
||||
Type: "article",
|
||||
ID: id,
|
||||
Title: title,
|
||||
InputMessageContent: InputTextMessageContent{
|
||||
Text: messageText,
|
||||
ParseMode: parseMode,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewInlineQueryResultArticleMarkdown creates a new inline query article with Markdown parsing.
|
||||
func NewInlineQueryResultArticleMarkdown(id, title, messageText string) InlineQueryResultArticle {
|
||||
return InlineQueryResultArticle{
|
||||
Type: "article",
|
||||
ID: id,
|
||||
Title: title,
|
||||
InputMessageContent: InputTextMessageContent{
|
||||
Text: messageText,
|
||||
ParseMode: "Markdown",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewInlineQueryResultArticleHTML creates a new inline query article with HTML parsing.
|
||||
func NewInlineQueryResultArticleHTML(id, title, messageText string) InlineQueryResultArticle {
|
||||
return InlineQueryResultArticle{
|
||||
Type: "article",
|
||||
ID: id,
|
||||
Title: title,
|
||||
InputMessageContent: InputTextMessageContent{
|
||||
Text: messageText,
|
||||
ParseMode: "HTML",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue