From f818aa7221f798d2c1eefe688ea9bf6f18a8f0b1 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Fri, 1 Apr 2022 18:12:13 +0300 Subject: [PATCH] Capture user settings update exception --- src/bots/factory/bots/approved/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bots/factory/bots/approved/index.ts b/src/bots/factory/bots/approved/index.ts index 9738016..bb58131 100644 --- a/src/bots/factory/bots/approved/index.ts +++ b/src/bots/factory/bots/approved/index.ts @@ -42,13 +42,17 @@ export async function createApprovedBot(token: string, state: BotState): Promise bot.use(async (ctx: Context, next) => { if (ctx.from) { const user = ctx.from; + createOrUpdateUserSettings({ user_id: user.id, last_name: user.last_name || '', first_name: user.first_name, username: user.username || '', source: me.username, + }).catch((e) => { + Sentry.captureException(e); }); + UsersCounter.take(user.id, me.username); } await next();