From fb042c89cd519a41f39eba1559df58fc31a97832 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Thu, 6 Aug 2020 10:53:57 +0200 Subject: Verification: remove unverified role on accept --- bot/cogs/verification.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py index 5586be040..5bc4f81c1 100644 --- a/bot/cogs/verification.py +++ b/bot/cogs/verification.py @@ -422,6 +422,11 @@ class Verification(Cog): """Accept our rules and gain access to the rest of the server.""" log.debug(f"{ctx.author} called !accept. Assigning the 'Developer' role.") await ctx.author.add_roles(discord.Object(constants.Roles.verified), reason="Accepted the rules") + + if constants.Roles.unverified in [role.id for role in ctx.author.roles]: + log.debug(f"Removing Unverified role from: {ctx.author}") + await ctx.author.remove_roles(discord.Object(constants.Roles.unverified)) + try: await ctx.author.send(VERIFIED_MESSAGE) except discord.Forbidden: -- cgit v1.2.3