[Scheduler] Expired bans now give a reason when audit logged. (#12)

This commit is contained in:
2026-08-25 09:39:28 -07:00
committed by GitHub
parent cb2348f89c
commit 896d3fc4d9
2 changed files with 5 additions and 6 deletions
+3 -4
View File
@@ -11,12 +11,11 @@ export async function checkExpiredBans(client: Client) {
for (const ban of await Database.getExpiredBans(date)) {
try {
await guild.bans.remove(ban.user_id);
await guild.bans.remove(ban.user_id, 'Ban expired.');
} catch (e) {
console.error(`Error unbanning user: ${ban.user_id}`);
console.error(e);
console.error(`Error unbanning user: ${ban.user_id}`, e);
}
}
await Database.pruneExpiredBans(date);
}
}