diff --git a/src/commands/softban.ts b/src/commands/softban.ts index 676a7d8..e242a25 100644 --- a/src/commands/softban.ts +++ b/src/commands/softban.ts @@ -70,7 +70,7 @@ export default { } try { - await interaction.guild.bans.remove(user); + await interaction.guild.bans.remove(user, 'User was softbanned.'); } catch (e) { console.error(e); return await interaction.editReply("Error softbanning user (couldn't remove ban)."); @@ -78,4 +78,4 @@ export default { await interaction.editReply('Softban successful'); } -}; \ No newline at end of file +}; diff --git a/src/utils/ban-utils.ts b/src/utils/ban-utils.ts index 1ed7464..ec1389f 100644 --- a/src/utils/ban-utils.ts +++ b/src/utils/ban-utils.ts @@ -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); -} \ No newline at end of file +}