Skip to main content

Library for formatting text for Telegram Bot API

Works with
This package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
4 days ago (0.1.2)

@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

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @gramio/format

Import symbol

import * as mod from "@gramio/format";

Add Package

npx jsr add @gramio/format

Import symbol

import * as mod from "@gramio/format";

Add Package

yarn dlx jsr add @gramio/format

Import symbol

import * as mod from "@gramio/format";

Add Package

pnpm dlx jsr add @gramio/format

Import symbol

import * as mod from "@gramio/format";

Add Package

bunx jsr add @gramio/format

Import symbol

import * as mod from "@gramio/format";