Getting Started with BotFather
Bots using BotFather
Name | Description |
---|---|
RadioArchiveBot | Listen your favorite radio stations right in the Telegram! |
EPGBot | Electronic program guides (TV guides) |
Want to add your bot? Please submit a pull request on GitHub to update this page!
Installing BotFather
$ cd MyBot$ npm install botfather --save
Using BotFather
// We recommend storing the token as environment variable.const TOKEN = processenvTOKEN const BotFather = const bf = TOKEN
Example #1 (Getting basic information about the bot)
bf
Example #2 (Sending file)
const fs = ;// ...bf
Example #3 (Extending your own class)
/** * @param * @see https://core.telegram.org/bots#6-botfather */ { supertoken this } TOKEN
Example #4 (Getting updates recursively)
/** * @constructor * @param * @see https://core.telegram.org/bots#6-botfather */ { supertoken this } /** * @param * @see https://core.telegram.org/bots/api#getupdates */ { this } /** * @param * @see https://core.telegram.org/bots/api#update */ { console } TOKEN