aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2020-05-09 16:14:13 +0200
committerGravatar Matteo Bertucci <[email protected]>2020-05-11 18:41:17 +0200
commit3f7a0a298ee469529ba9dac5af2399e28ca1e401 (patch)
tree27b50472461d89f6737d2ab421a17c7179e83a97
parentHandle staff users and DMs in the halloweenify cog (diff)
Update halloweenify error message to make it more readable and restructure the flow
Diffstat (limited to '')
-rw-r--r--bot/exts/halloween/halloweenify.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/halloween/halloweenify.py b/bot/exts/halloween/halloweenify.py
index e8ec5ec7..a19066cf 100644
--- a/bot/exts/halloween/halloweenify.py
+++ b/bot/exts/halloween/halloweenify.py
@@ -41,21 +41,21 @@ class Halloweenify(commands.Cog):
)
embed.set_image(url=image)
- try:
- if isinstance(ctx.author, discord.Member):
+ if isinstance(ctx.author, discord.Member):
+ try:
await ctx.author.edit(nick=nickname)
embed.description += f"Your new nickname will be: \n:ghost: **{nickname}** :jack_o_lantern:"
- else: # The command has been invoked in DM
+ except Forbidden: # The bot doesn't have enough permission
embed.description += (
f"Your new nickname should be: \n :ghost: **{nickname}** :jack_o_lantern: \n\n"
- f"Feel free to change it yourself, or invoke the command again inside the server."
+ f"It looks like I cannot change your name, but feel free to change it yourself."
)
- except Forbidden: # The bot doesn't have enough permission
+ else: # The command has been invoked in DM
embed.description += (
f"Your new nickname should be: \n :ghost: **{nickname}** :jack_o_lantern: \n\n"
- f"Although it looks like I can't change it myself, but feel free to change it yourself."
+ f"Feel free to change it yourself, or invoke the command again inside the server."
)
await ctx.send(embed=embed)