mullwar/telebot

Won't run

robertnicjoo opened this issue · 2 comments

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?

You have to put

bot.start();

at the end of your file.

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();

https://github.com/abdellahaarab/Telebotsjs