markdown

This method creates a message in Makrdown format.

markdown(syntax=String, reply_markup=Hash, extra_params=Hash)

Platforms

PlatformSupported

Messenger

WhatsApp

Telegram

View the full Markdown styles supported by Telegram here.

Usage

Markdown only

@reply.markdown("*bold text* _italic text_ __underline__ ~strikethrough~")

Markdown with buttons

@reply.markdown(
  "*bold text* _italic text_ __underline__ ~strikethrough~",
  {
    button: [
      {
        payload: :option_1,
        title: "Option 1!"
      }
    ]
  }
)

Params

NameDescription

syntax String

Required.

The Markdown syntax with 4096 characters max. View the styles supported here.

reply_markup Hash

Optional. Hash with one element that can be:

:quick_reply => inlinekeyboardmarkup

:button => replykeyboardmarkup

extra_params Hash

Optional. Hash with more params, view the full list from Telegram.

Last updated