Reputation: 49
I am facing a problem.
I watched the course on creating a Telegram bot, I did everything as in the video, but when I start it, it gives me an error. There are no errors in the code, I don’t know what the problem is.
Here's the code itself:
const Telegraf = require('telegraf');
const bot = new Telegraf('SECRET_API_KEY');
// /start
bot.start((ctx) => {
ctx.reply("You have entered the start command");
})
bot.Launch();
Upvotes: 0
Views: 628
Reputation: 308
The method on bot is launch
with a small 'L', i.e. bot.launch()
Also, please don't expose your API Key like that
Upvotes: 1