carbon-telegram-bot
Introduction
Telegram Bots can handle messages automatically. Users can interact with bots by sending messages in private or group chats that .
This package is intended to listen to Update messages received by your bot's server /post webhook. Then carbon-telegram-bot
will listen to pre-formatted
or code
markdown and reply the chat message with a beautiful Carbon code snippet.
Installation
$ npm install carbon-telegram-bot
or using yarn
:
$ yarn add carbon-telegram-bot
Triggering the bot
carbon-telegram-bot will always trigger when a message is sent in chat fomarted as code
or pre-formated
text as follows:
Markdown:
`code` and ```pre-formatted```
More information: Telegram markdown style
Implementation Examples
const express = ;const carbonBot = ; const app = ;app; // first specify a url to receive incoming updates via a webhook// (https://core.telegram.org/bots/api#setwebhook)// then listen to the webhook endpoint that you specifiedapp; app;
Code snippet generated with above example:
;; const app = ;app; // first specify a url to receive incoming updates via a webhook// (https://core.telegram.org/bots/api#setwebhook)// then listen to the webhook endpoint that you specifiedapp; app;
Code snippet generated with above example:
Contributions are welcome. Just send me a PR.