mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-09-15 23:42:21 +02:00
fix(arabot): add failsafe for user leaving guild
This commit is contained in:
parent
8c06bb6b88
commit
4e041f102e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user