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)
channel = discord.utils.get(ctx.guild.text_channels, name="verify")
if role and role < ctx.me.top_role:
await ctx.author.remove_roles(role, reason=f"Auto de-verified")
if channel:
try:
await ctx.author.send(
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
return
else:
view = VerifyView(ctx)
return await ctx.respond(view=view, ephemeral=True)
if role in ctx.author.roles:
if role and role < ctx.me.top_role:
await ctx.author.remove_roles(role, reason=f"Auto de-verified")
if channel:
try:
await ctx.author.send(
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
return
view = VerifyView(ctx)
return await ctx.respond(view=view, ephemeral=True)
@commands.command(name="de-verify")
@commands.is_owner()

1
website/.env Normal file
View file

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