Browse Source

New error handling check to make sure ;-; doesn't trigger CommandNotFound. Works since command's shouldn't have punctuation at the beginning anyway.

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

+ 2
- 0
README.md View File

@@ -26,7 +26,9 @@ _Coming Soon_
- 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.
- Reddit cog got some lovely refactoring.
###### Bug Fixes
- ;-; now no longer raises the CommandNotFound error with a better way of stopping t

#### v1.5.1
##### Hot Fixes

+ 3
- 3
Roxbot/err_handle.py View File

@@ -46,11 +46,11 @@ class ErrHandle:
elif isinstance(error, commands.TooManyArguments):
embed = discord.Embed(description="Too many arguments given.")
elif isinstance(error, commands.CommandNotFound):
cc =guild_settings.get(ctx.guild).custom_commands # Delete this when we update this system.
cc = guild_settings.get(ctx.guild).custom_commands
if ctx.invoked_with in cc["1"]:
embed = None
elif ctx.message.content.strip(ctx.prefix)[0] in string.punctuation:
# Should avoid punctuation emoticons
elif any(x in string.punctuation for x in ctx.message.content.strip(ctx.prefix)[0]):
# Should avoid punctuation emoticons. Checks all of the command for punctuation in the string.
embed = None
else:
embed = discord.Embed(description="That Command doesn't exist.")

Loading…
Cancel
Save