mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
fix verify command
This commit is contained in:
parent
e4f3af5c00
commit
e10cac324e
2 changed files with 15 additions and 14 deletions
|
@ -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
1
website/.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
NEXTAUTH_URL=https://lcc.nexy7574.cyou
|
Loading…
Reference in a new issue