Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
avernikoz committed Mar 10, 2024
1 parent 6bd7da6 commit a22912d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import { timeoutMiddleware } from './middleware/timeoutMiddleware';
import { BotContext, SessionData } from './types';
import { BOT_TOKEN, ENVIRONMENT } from './config/bot.config';

function errorBoundaryHandler(err: BotError) {
console.error('[Error Boundary Handler]', err);
}


const APP_VERSION = '1.1.2';

if (instance && instance['opts']) {
Expand Down Expand Up @@ -86,6 +91,7 @@ async function startBot(): Promise<void> {
}),
);

bot.errorBoundary(errorBoundaryHandler).use(composer)
bot.use(menu);

bot.command('version', async (ctx) => {
Expand Down Expand Up @@ -174,12 +180,6 @@ async function startBot(): Promise<void> {
}
});

function errorBoundaryHandler(err: BotError) {
console.error('[Error Boundary Handler]', err);
}

bot.errorBoundary(errorBoundaryHandler).use(composer)

// bot.errorBoundary(errorBoundaryHandler)

ENVIRONMENT === 'local' && bot.start();
Expand Down

0 comments on commit a22912d

Please sign in to comment.