From 10b57926ed18802a6390c997f395236d3d1b5031 Mon Sep 17 00:00:00 2001 From: pinks Date: Sat, 23 Sep 2023 01:40:21 +0200 Subject: [PATCH] fix: cancel command --- bot/cancelCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/cancelCommand.ts b/bot/cancelCommand.ts index 090afbc..8b88454 100644 --- a/bot/cancelCommand.ts +++ b/bot/cancelCommand.ts @@ -4,7 +4,7 @@ import { Context } from "./mod.ts"; export async function cancelCommand(ctx: Context) { const jobs = await generationQueue.getAllJobs(); const userJobs = jobs - .filter((job) => job.lockUntil > new Date()) + .filter((job) => job.lockUntil < new Date()) .filter((j) => j.state.from.id === ctx.from?.id); for (const job of userJobs) await generationQueue.deleteJob(job.id); await ctx.reply(`Cancelled ${userJobs.length} jobs`);