From 3b1eb0ee166b5864b56fc6c5b629dbbd4501ba4f Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 9 Aug 2022 17:01:30 +0300 Subject: [PATCH] Fix debugger --- src/bots/factory/bots/approved/index.ts | 4 ++-- src/bots/limiter/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bots/factory/bots/approved/index.ts b/src/bots/factory/bots/approved/index.ts index 9d682fa..eb0040e 100644 --- a/src/bots/factory/bots/approved/index.ts +++ b/src/bots/factory/bots/approved/index.ts @@ -25,7 +25,7 @@ import { getAnnotationHandler } from './annotations'; import Sentry from '@/sentry'; -const botDebugger = debug("approvedBot"); +const log = debug("approvedBot"); export async function createApprovedBot(token: string, state: BotState): Promise { @@ -460,7 +460,7 @@ export async function createApprovedBot(token: string, state: BotState): Promise }); bot.catch((err, ctx: Context) => { - botDebugger.log({err, ctx}); + log({err, ctx}); Sentry.captureException(err); }); diff --git a/src/bots/limiter/index.ts b/src/bots/limiter/index.ts index 2887953..f96a498 100644 --- a/src/bots/limiter/index.ts +++ b/src/bots/limiter/index.ts @@ -44,7 +44,7 @@ export default class Limiter { static async isLimited(updateId: number): Promise { const count = await this._getCount(updateId); - this.debugger(`${updateId}: ${count}`) + this.debugger(`${updateId}: ${count}`); return count > this.MAX_PROCESSING_COUNT; }