Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't run #205

Open
robertnicjoo opened this issue May 21, 2021 · 2 comments
Open

Won't run #205

robertnicjoo opened this issue May 21, 2021 · 2 comments

Comments

@robertnicjoo
Copy link

robertnicjoo commented May 21, 2021

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?

@ghost
Copy link

ghost commented Jul 21, 2021

You have to put

bot.start();

at the end of your file.

@abdellahaarab
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants