Skip to content

Commit

Permalink
chore: Refactor error handling and launch method in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Jul 19, 2024
1 parent cdbfed2 commit 39acb07
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const { Telegraf } = require("telegraf");
const bot = new Telegraf(process.env.BOT_TOKEN);
bot.catch((err, ctx) => {
console.log(`Ooops, encountered an error for ${ctx.updateType}`);
console.log(err);
});

// components
bot.use(
Expand Down

0 comments on commit 39acb07

Please sign in to comment.