Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@gramio/format

gramiojs2.4kMIT0.3.3TypeScript support: included

Library for formatting text for Telegram Bot API

gramio, telegram, bot, formatting, markdown, html, markdownV2

readme

@gramio/format

Library for formatting text for Telegram Bot API. Used under the hood by GramIO framework but it framework-agnostic.

npm JSR JSR Score

Usage

bot.api.sendMessage({
    chat_id: 12321,
    text: format`${bold`Hi!`}

        Can ${italic("you")} help ${spoiler`me`}?

            Can you give me a ${link("star", "https://github.com/gramiojs/gramio")}?`,
});

example

See Documentation