Fix debugger

This commit is contained in:
2022-08-09 17:01:30 +03:00
parent 8c945cf577
commit 3b1eb0ee16
2 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ import { getAnnotationHandler } from './annotations';
import Sentry from '@/sentry'; import Sentry from '@/sentry';
const botDebugger = debug("approvedBot"); const log = debug("approvedBot");
export async function createApprovedBot(token: string, state: BotState): Promise<Telegraf> { export async function createApprovedBot(token: string, state: BotState): Promise<Telegraf> {
@@ -460,7 +460,7 @@ export async function createApprovedBot(token: string, state: BotState): Promise
}); });
bot.catch((err, ctx: Context) => { bot.catch((err, ctx: Context) => {
botDebugger.log({err, ctx}); log({err, ctx});
Sentry.captureException(err); Sentry.captureException(err);
}); });

View File

@@ -44,7 +44,7 @@ export default class Limiter {
static async isLimited(updateId: number): Promise<boolean> { static async isLimited(updateId: number): Promise<boolean> {
const count = await this._getCount(updateId); const count = await this._getCount(updateId);
this.debugger(`${updateId}: ${count}`) this.debugger(`${updateId}: ${count}`);
return count > this.MAX_PROCESSING_COUNT; return count > this.MAX_PROCESSING_COUNT;
} }