Closed heidarsaleh closed 8 years ago
Hello, I tried the attached sample and I got an error: Cant find controller for update, code is below:
const Telegram = require('telegram-node-bot') const TelegramBaseController = Telegram.TelegramBaseController const tg = new Telegram.Telegram('I placed my token here')
class PingController extends TelegramBaseController { /* * @param {Scope} $ / pingHandler($) { $.sendMessage('pong') }
get routes() { return { 'ping': 'pingHandler' } }
}
tg.router .when(['ping'], new PingController())
It's just a warning, you don't have a handler for this command
I've just tested this, it works fine
Hello, I tried the attached sample and I got an error: Cant find controller for update, code is below:
const Telegram = require('telegram-node-bot') const TelegramBaseController = Telegram.TelegramBaseController const tg = new Telegram.Telegram('I placed my token here')
class PingController extends TelegramBaseController { /* * @param {Scope} $ / pingHandler($) { $.sendMessage('pong') }
}
tg.router .when(['ping'], new PingController())