+ }
+
+ if len(entities) > 0 {
+ params["entities"] = entities
+ }
+
+ return b.call(ctx, "sendMessage", params, nil)
+}
+
+// SendRichMessage sends markdown to chat as a rich message, which Telegram
+// renders itself, tables included. A call that takes longer than sendTimeout
+// fails with errBotNetwork.
+func (b *botAPI) SendRichMessage(ctx context.Context, chat int64, markdown string) error {
+ ctx, cancel := context.WithTimeout(ctx, b.sendTimeout)
+ defer cancel()
+
+ return b.call(ctx, "sendRichMessage", map[string]any{
+ "chat_id": chat,
+ "rich_message": map[string]any{
+ "markdown": markdown,
+ },