diff --git a/src/bot.ts b/src/bot.ts index 4e1b1ef..b3fefa3 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -49,8 +49,10 @@ export async function getBot(config: AppConfig, development = false) { if (development) { bot.use(async (ctx, next) => { + console.time("update"); console.log(ctx.update); await next(); + console.timeEnd("update"); }); } diff --git a/src/handlers/registered.ts b/src/handlers/registered.ts index d445b16..4c4fa56 100644 --- a/src/handlers/registered.ts +++ b/src/handlers/registered.ts @@ -46,6 +46,10 @@ export function install(bot: Bot) { const formattedAmount = BRL(finalValue); + await new Promise((resolve) => { + setTimeout(resolve, 15000); + }); + return ctx.answerInlineQuery([ { id: query, @@ -82,6 +86,7 @@ export function install(bot: Bot) { finalValue.toFixed(2), ), }, - ], { cache_time: 0 }); + ], { cache_time: 0 }) + .catch(console.error); }); }