telegram-bot
Create your own Telegram bot in minutes with the official Bot API!
Quick Start
An echo bot in 9 lines: (CoffeeScript)
Telegram = require 'telegram-bot' tg = processenvTELEGRAM_BOT_TOKENtgon 'message' return unless msgtext tgsendMessage text: msgtext reply_to_message_id: msgmessage_id chat_id: msgchatid tgstart
or 11 lines (JavaScript):
var Telegram = ;var tg = processenvTELEGRAM_BOT_TOKEN; tg; tgstart;
For more examples, checkout the examples
folder!
API Reference
All methods in the official Bot API can be called directly on the Telegram
object. For a complete list of available methods, check it out here.
Todo
- better logging
- add more examples utilizing multimedia messages