Skip to content

Commit 1a6b1fe

Browse files
committed
chore: update unblock command
1 parent 6456055 commit 1a6b1fe

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/commands/unblock.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ export default async function (msg: Message) {
2121

2222
const lids = msg.mentionedIds.map((id) => id.split("@")[0]);
2323

24-
await prisma.block.deleteMany({
25-
where: { lid: { in: lids } },
26-
});
27-
28-
await Promise.all(
29-
msg.mentionedIds.map((lid) =>
24+
await Promise.all([
25+
prisma.block.deleteMany({
26+
where: { lid: { in: lids } },
27+
}),
28+
lids.map((lid) =>
3029
redis.set(
3130
`rate:${lid}`,
3231
JSON.stringify({ timestamps: [], penaltyCount: 0, penaltyUntil: 0 }),
3332
),
3433
),
35-
);
34+
]);
3635

3736
await msg.react("✅");
3837
}

0 commit comments

Comments
 (0)