mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-24 22:46:41 +07:00
fallback for no recorded requests
This commit is contained in:
parent
f3e0062033
commit
4492ecfb72
1 changed files with 7 additions and 1 deletions
|
@ -37,7 +37,13 @@ export class TelegramApi {
|
|||
return;
|
||||
}
|
||||
|
||||
const { body, createdAt } = await this.db.popRequest();
|
||||
const request = await this.db.popRequest();
|
||||
if (!request) {
|
||||
await ctx.reply(`sorry, no logged requests yet`);
|
||||
return next();
|
||||
}
|
||||
|
||||
const { body, createdAt } = request;
|
||||
const source = JSON.stringify(body, null, 2);
|
||||
|
||||
await ctx.replyWithDocument(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue