FollEnsoo
FollEnsoo

Reputation: 49

Error: Cannot find module. at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)

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

Answers (1)

Aniket Agarwal
Aniket Agarwal

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

Related Questions