diff --git a/cogs/verification.py b/cogs/verification.py index 51a9d84..592b5d9 100644 --- a/cogs/verification.py +++ b/cogs/verification.py @@ -184,7 +184,8 @@ async def _email(self, ctx, arg): print(f"Alert! Bot has encountered an exception. Traceback: {e}") return - await ctx.send(f"Verification email sent to {ctx.author.mention}, please use `{self.bot_key}verify ####`, where `####` is the token, to verify.") + await ctx.send(f"Verification email sent to {ctx.author.mention}, please use `{self.bot_key}verify ####`, where `####` is the token, to verify.\n" + f"If you can't find the email, please check your 'Junk Email' folder before contacting the moderation team.") if self.email_attempts: if ctx.author.id in self.email_attempts: @@ -233,8 +234,6 @@ async def _verify(self, ctx, arg): # Do the actual verification. if self.token_list: if self.token_list[ctx.author.id] == arg: - await ctx.send(f"{ctx.author.mention}, you've been verified!") - role = discord.utils.get(ctx.guild.roles, name=self.role) if not role: role = discord.utils.find(lambda r: str(r.id) == str(self.role), ctx.guild.roles) @@ -244,6 +243,9 @@ async def _verify(self, ctx, arg): hashed = self.bot.hashing.hash(self.email_list[ctx.author.id]) file.write(f"{hashed}\n") file.close() + + self.token_list.pop(ctx.author.id) # Remove the token from the active list. + await ctx.send(f"{ctx.author.mention}, you've been verified!") else: await ctx.send(f"Invalid token submitted, {ctx.author.mention}! Please submit the 4-digit token send to your email to verify.") if self.verify_attempts: diff --git a/docker-compose.yml b/docker-compose.yml index 96137fc..b5f1e6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,9 @@ -version: "3" +version: "3.1" services: - dockerbot: - image: kaosjr/verificationbot:latest + verificationbot: + build: + context: ./ + dockerfile: Dockerfile environment: # The Discord bot token being used. Do not share this! - token=