Won't run
robertnicjoo opened this issue · 2 comments
robertnicjoo commented
I have
const TeleBot = require('telebot');
const token = "......................."
const bot = new TeleBot(token);
And when I run node index
here is what I get in console/terminal
$ node index
[bot.plugin] loaded 'regExpMessage' plugin
[bot.plugin] loaded 'shortReply' plugin
And the command is closed! it does not run the bot. Why?
Deleted user commented
You have to put
bot.start();
at the end of your file.
abdellahaarab commented
const TeleBot = require('telebot');
const token = ""
const bot = new TeleBot(token);
console.log("starting...")
bot.on(['/start', '/hello'], (msg) => msg.reply.text('Welcome!'));
bot.start();