Browse Source

changed the MissingRequiredArgument error handling to be more useful.

tags/v1.6.0
Roxie Gibson 6 years ago
parent
commit
62ea014f68
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      Roxbot/cogs/selfassign.py
  2. +1
    -1
      Roxbot/err_handle.py

+ 1
- 1
Roxbot/cogs/selfassign.py View File

@@ -46,7 +46,7 @@ class SelfAssign():
if role is None:
# Hacky way to get the error I want
from inspect import Parameter
raise commands.MissingRequiredArgument(Parameter("role", False))
raise commands.MissingRequiredArgument(Parameter("Role", False))

if not settings.self_assign["enabled"]:
embed = discord.Embed(colour=discord.Colour(self.embed_colour),

+ 1
- 1
Roxbot/err_handle.py View File

@@ -39,7 +39,7 @@ class ErrHandle:
elif isinstance(error, commands.DisabledCommand):
embed = discord.Embed(description="This command is disabled.")
elif isinstance(error, commands.MissingRequiredArgument):
embed = discord.Embed(description="Argument missing.")
embed = discord.Embed(description="Argument missing. {}".format(error.args[0]))
elif isinstance(error, commands.BadArgument):
embed = discord.Embed(description="Invalid Argument given. Please check arguments given.")
elif isinstance(error, commands.TooManyArguments):

Loading…
Cancel
Save