mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 00:47:44 +00:00
Fix errors
This commit is contained in:
parent
8b7be6b886
commit
f1af800e10
1 changed files with 11 additions and 6 deletions
|
@ -73,20 +73,25 @@ class Miscellaneous(
|
|||
return
|
||||
|
||||
await message.author.edit(nick=name[5:])
|
||||
await message.channel.send(
|
||||
f"Welcome back {escape_markdown(message.author.mention)}! I've unset your AFK status.")
|
||||
await message.channel.send(f"Welcome back {escape_markdown(message.author.mention)}! I've unset your AFK status.")
|
||||
|
||||
@command(
|
||||
brief="Sets you as AFK.",
|
||||
help="Sets you as AFK.",
|
||||
)
|
||||
async def afk(self, ctx: Context) -> None:
|
||||
if ctx.me.top_role.position <= ctx.author.top_role.position:
|
||||
await ctx.reply(
|
||||
"I cannot set you as AFK because my role is lower than yours. You can edit your nickname to set yourself as AFK (Add [AFK] to the start of it.).")
|
||||
# no error cuz it will un-afk them
|
||||
if ctx.author.display_name.lower().startswith("[AFK]"):
|
||||
return
|
||||
|
||||
await ctx.author.edit(nick=f"[AFK] {ctx.author.display_name}")
|
||||
if ctx.me.top_role.position <= ctx.author.top_role.position:
|
||||
await ctx.reply(
|
||||
"I cannot set you as AFK because my role is lower than yours."
|
||||
"You can edit your nickname to set yourself as AFK (Add [AFK] to the start of it.)."
|
||||
)
|
||||
return
|
||||
|
||||
await ctx.author.edit(nick=f"[AFK] {ctx.author.display_name}"[:32])
|
||||
await ctx.reply("Set your status to AFK. You can now touch grass freely 🌲.")
|
||||
|
||||
@Cog.listener()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue