Syntax Highlight Bot

Add bot to group and it will highlight every multiline code message.xml<div>Hello</div>

Start communication with Syntax Highlight Bot bot in your Telegram, by clicking on the "Send Message" button.

Do you like this bot? login or click @dailychannelsbot to rate this bot via Telegram


Syntax Highlighter Bot

The bot for creating an image with highlighted code from a message.


This bot was written on top of the Telegraf.js bot framework, so all you need to have is the Node.js > v6.


Demo (WIP version).

The bot listens for entities type of pre in any text message. It means, it will render all pieces of text, wrapped in triple backticks (multiline code). Also you could force the language, writing its name on the first line, right after backticks. Just like on the GitHub.

Look at the example of a code should be handled by the bot:

 * Show themes list
bot.command('theme', (ctx) => isPrivateChat(ctx)
  ? ctx.replyWithMarkdown(
  : ctx.reply(messages.themeGroup)


  • /start - Initial launch of the bot.
  • /theme - Shows the list of included themes and allows you to select a theme which you like more.
  • /langs - Shows the list of supported languages.


First of all clone this repository and install dependencies. Run in the terminal:

$ git clone [email protected]:Piterden/syntax-highlighter-bot.git
$ cd syntax-highlighter-bot
$ npm i

Then you need to create and fill the new .env file:

$ cp .env.example .env
$ editor .env

Built With


Please read for details on our code of conduct, and the process for submitting pull requests to us.


  • Cristian Ospina - Initial version of the bot - CristianOspina
  • Denis Efremov - Rewrite to the Node.js - Piterden


This project is licensed under the MIT License - see the file for details.


Telegram bots you may like