forked from pinks/eris
remove from queue when user blocked bot
This commit is contained in:
parent
97f261d01c
commit
13bd410bdc
|
@ -58,7 +58,9 @@ export async function processJobs(): Promise<never> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await job.delete().catch(() => undefined);
|
await job.delete().catch(() => undefined);
|
||||||
|
if (!(err instanceof Grammy.GrammyError) || err.error_code !== 403 /* blocked bot */) {
|
||||||
await jobStore.create(job.value);
|
await jobStore.create(job.value);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => busyWorkers.delete(worker.name));
|
.finally(() => busyWorkers.delete(worker.name));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue