forked from pinks/eris
1
0
Fork 0

remove from queue when user blocked bot

This commit is contained in:
pinks 2023-09-11 01:57:42 +02:00
parent 97f261d01c
commit 13bd410bdc
1 changed files with 2 additions and 0 deletions

View File

@ -58,7 +58,9 @@ export async function processJobs(): Promise<never> {
);
}
await job.delete().catch(() => undefined);
if (!(err instanceof Grammy.GrammyError) || err.error_code !== 403 /* blocked bot */) {
await jobStore.create(job.value);
}
})
.finally(() => busyWorkers.delete(worker.name));
} catch (err) {