Преглед изворни кода

MissingPermissions and BotMissingPermissions error handling should look nicer now.

tags/v1.6.0
Roxie Gibson пре 6 година
родитељ
комит
7afbbb0299
2 измењених фајлова са 3 додато и 3 уклоњено
  1. +1
    -1
      README.md
  2. +2
    -2
      Roxbot/err_handle.py

+ 1
- 1
README.md Прегледај датотеку

- Logging is now easier internally. - 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. - 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 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. - Reddit cog got some lovely refactoring, which includes some author credit when posting.
###### Bug Fixes ###### Bug Fixes
- ";-;" and other similar text emoticons now no longer raises the CommandNotFound error. - ";-;" and other similar text emoticons now no longer raises the CommandNotFound error.

+ 2
- 2
Roxbot/err_handle.py Прегледај датотеку

else: else:
embed = discord.Embed(description="That Command doesn't exist.") embed = discord.Embed(description="That Command doesn't exist.")
elif isinstance(error, commands.BotMissingPermissions): 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): 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): elif isinstance(error, commands.NotOwner):
embed = discord.Embed(description="You do not have permission to do this. You are not Roxie!") embed = discord.Embed(description="You do not have permission to do this. You are not Roxie!")
elif isinstance(error, commands.CommandOnCooldown): elif isinstance(error, commands.CommandOnCooldown):

Loading…
Откажи
Сачувај