2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 21:07:39 +00:00

Update README.hbs

This commit is contained in:
Yago 2015-10-20 09:46:56 +02:00
parent 1ce816c794
commit 9654b336e2

View File

@ -13,6 +13,7 @@ var token = 'YOUR_TELEGRAM_BOT_TOKEN';
// Setup polling way
var bot = new TelegramBot(token, {polling: true});
// Matches /echo [whatever]
bot.onText(/\/echo (.+)/, function (msg, match) {
var fromId = msg.from.id;
var resp = match[1];