fix verify command

This commit is contained in:
eek7574 2022-11-23 11:54:59 +00:00
parent e4f3af5c00
commit e10cac324e
2 changed files with 15 additions and 14 deletions

View file

@ -21,20 +21,20 @@ class VerifyCog(commands.Cog):
role = discord.utils.find(lambda r: r.name.lower() == "verified", ctx.guild.roles) role = discord.utils.find(lambda r: r.name.lower() == "verified", ctx.guild.roles)
channel = discord.utils.get(ctx.guild.text_channels, name="verify") channel = discord.utils.get(ctx.guild.text_channels, name="verify")
if role and role < ctx.me.top_role: if role in ctx.author.roles:
await ctx.author.remove_roles(role, reason=f"Auto de-verified") if role and role < ctx.me.top_role:
if channel: await ctx.author.remove_roles(role, reason=f"Auto de-verified")
try: if channel:
await ctx.author.send( try:
f"You have been automatically de-verified. Please re-verify by going to {channel.mention} and" await ctx.author.send(
f" typing </verify:{ctx.command.id}>." f"You have been automatically de-verified. Please re-verify by going to {channel.mention} and"
) f" typing </verify:{ctx.command.id}>."
except discord.Forbidden: )
pass except discord.Forbidden:
return pass
else: return
view = VerifyView(ctx) view = VerifyView(ctx)
return await ctx.respond(view=view, ephemeral=True) return await ctx.respond(view=view, ephemeral=True)
@commands.command(name="de-verify") @commands.command(name="de-verify")
@commands.is_owner() @commands.is_owner()

1
website/.env Normal file
View file

@ -0,0 +1 @@
NEXTAUTH_URL=https://lcc.nexy7574.cyou