tg_bot

Telegram Bot: simple async interface

Usage no npm install needed!

<script type="module">
  import tgBot from 'https://cdn.skypack.dev/tg_bot';
</script>

README

Simple Async-oriented Telegram Bot

Bot has simplify interface for fast creating telegram bots. Events, expect and other.

Installation

npm install tg_bot

Integration

var TelegramBot = require('tg_bot');
var bot = new TelegramBot('YOUR_TELEGRAM_BOT_TOKEN');

bot.on('*',function(message, chat){ //In all events callback receive objects [Message](#Message) and [Chat](#Chat)
    // your logic here ...
    
    chat.sendMessage("Hello!",function(error){
        console.error(error);
    });
    
})

API

Telegram Bot builded on node-telegram-bot-api