Telegram Basic Bot
This is a basic telegram bot wrapper that has no dependencies and will run on basically any node version. This is great for anyone
Install
Just copy telegram.js into your project. There are no dependencies, and you'll definitely be getting the source code right here.
Alternatively, use npm (not recommended)
npm install --save node-telegram-bot-api
Usage
The basic bot uses the EventEmitter pattern when getting events, and standard error first callbacks
var TelegramClient = ;var telegram = token; // send a messagetelegram; // get a filetelegram; // polling or webhooktelegram; // not implemented yettelegram;
Named methods
As a convenience, named methods can be generated to shorten calling. This is not recommended as there is no guarantee that these methods will be kept up to date with new API additions. If using this feature, methods.js is also required.
var telegram = token true; telegram;
Promises
Fuck off