@rundik/telegram-text-entities-filler
v0.2.2
Published
Simply fills text with entities markup
Downloads
3
Readme
telegram-text-entities-filler
Simple library that helps fills text with entities markup. Fork of https://www.npmjs.com/package/telegram-text-entities-filler
Installation
$ npm install @rundik/telegram-text-entities-filler
or using yarn
:
$ yarn add @rundik/telegram-text-entities-filler
Example
This bot will respond with the same message, keeping the text markup
const Telegraf = require('telegraf');
const { fillMarkdownEntitiesMarkup } = require('@rundik/telegram-text-entities-filler');
const bot = new Telegraf(process.env.BOT_TOKEN);
bot.on('text', (ctx) =>
ctx.reply(
fillMarkdownEntitiesMarkup(ctx.message.text, ctx.message.entities),
{ parse_mode: "MarkdownV2" }
)
);
bot.launch();