diff --git a/src/listeners/verification/joinVC.ts b/src/listeners/verification/joinVC.ts index dbba347..d987b8d 100644 --- a/src/listeners/verification/joinVC.ts +++ b/src/listeners/verification/joinVC.ts @@ -462,6 +462,14 @@ class VerificationJoinVCListener extends Listener { await finishVerification(verId, button.user.id, info); // Give roles on Discord await this.giveRoles(user, info.roles); + // Add timeout if they do not have activist role + if (!info.roles.activist) { + // @ts-ignore + this.container.tasks.create('verifyUnblock', { + userId: user.id, + guildId: guild.id, + }, (info.roles.vegan || info.roles.convinced) ? 604800000 : 1814400000); + } // Add embed saying verification completed embed = new MessageEmbed() .setColor('#34c000') @@ -564,6 +572,8 @@ class VerificationJoinVCListener extends Listener { } if (roles.activist) { rolesAdd.push(IDs.roles.vegan.activist); + } else { + rolesAdd.push(IDs.roles.verifyBlock); } if (roles.trusted) { rolesAdd.push(IDs.roles.trusted); diff --git a/src/listeners/verification/leaveVC.ts b/src/listeners/verification/leaveVC.ts index e27661b..0675291 100644 --- a/src/listeners/verification/leaveVC.ts +++ b/src/listeners/verification/leaveVC.ts @@ -76,13 +76,6 @@ class VerificationLeaveVCListener extends Listener { console.log(userSnowflake); const user = guild.members.cache.get(userSnowflake!)!; - /* - // Add the user to the database if it's not a verifier meeting - if (!oldState.channel.name.includes(' - Verification')) { - await finishVerification(oldState.channelId!, true, true, false, false); - } - */ - // Remove verify as vegan and give non vegan role if (!await checkFinish(channel.id)) { await user.roles.remove(IDs.roles.verifyingAsVegan); @@ -98,7 +91,10 @@ class VerificationLeaveVCListener extends Listener { const banLength = fibonacci(incompleteCount) * 10000; // * 3600 commented because development // @ts-ignore - this.container.tasks.create('verifyUnblock', { userId: user.id, guildId: guild.id }, banLength); + this.container.tasks.create('verifyUnblock', { + userId: user.id, + guildId: guild.id, + }, banLength); } }