Browse Source

MissingPermissions and BotMissingPermissions error handling should look nicer now.

tags/v1.6.0
Roxie Gibson 6 years ago
parent
commit
7afbbb0299
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      README.md
  2. +2
    -2
      Roxbot/err_handle.py

+ 1
- 1
README.md View File

@@ -26,7 +26,7 @@ _Coming Soon_
- Logging is now easier internally.
- The subreddit command has logging. Only when it is being directly invoked and not when an inbuilt command is being used.
- Added who the waifu command is dedicated to in the command description.
- Added more helpful error handling for missing argument errors.
- Added more helpful error handling for MissingRequiredArgument, BadArgument, MissingPermissions, and BotMissingPermissions errors.
- Reddit cog got some lovely refactoring, which includes some author credit when posting.
###### Bug Fixes
- ";-;" and other similar text emoticons now no longer raises the CommandNotFound error.

+ 2
- 2
Roxbot/err_handle.py View File

@@ -55,9 +55,9 @@ class ErrHandle:
else:
embed = discord.Embed(description="That Command doesn't exist.")
elif isinstance(error, commands.BotMissingPermissions):
embed = discord.Embed(description="I am missing the following permissions: {}".format(str(error.missing_perms).strip("[]")))
embed = discord.Embed(description="{}".format(error.args[0].replace("Bot", "Roxbot")))
elif isinstance(error, commands.MissingPermissions):
embed = discord.Embed(description="You are missing the following permissions: {}".format(str(error.missing_perms).strip("[]")))
embed = discord.Embed(description="{}".format(error.args[0]))
elif isinstance(error, commands.NotOwner):
embed = discord.Embed(description="You do not have permission to do this. You are not Roxie!")
elif isinstance(error, commands.CommandOnCooldown):

Loading…
Cancel
Save