mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-12-21 03:58:05 +01:00
fix(arabot): add failsafe for user leaving guild
This commit is contained in:
@@ -80,7 +80,8 @@ class VerificationLeaveVCListener extends Listener {
|
||||
// Get roles to give back to the user
|
||||
const roles = await fetchRoles(user.id);
|
||||
roles.push(IDs.roles.verifyBlock);
|
||||
await user.roles.add(roles);
|
||||
await user.roles.add(roles)
|
||||
.catch(() => console.error('Verification: User left but bot still tried to add roles'));
|
||||
// Create timeout block for user
|
||||
// Counts the recent times they have incomplete verifications
|
||||
const incompleteCount = await countIncomplete(user.id) % (leaveBan + 1);
|
||||
|
||||
Reference in New Issue
Block a user