fix more error handling.
also i know the repo is dead shut up
This commit is contained in:
parent
785796973e
commit
b06fee294e
2
bot.py
2
bot.py
|
@ -158,7 +158,7 @@ async def on_command_error(ctx, error):
|
||||||
elif isinstance(error, hypierror.InvalidPlayer):
|
elif isinstance(error, hypierror.InvalidPlayer):
|
||||||
message = _("This seems to be an invalid player - it doesn't have an entry on Mojang's API.\nTry running {PREFIX}[command] {uuid} False to search by UUID instead. Run {PREFIX}help bedwars for more info.").format(PREFIX=PREFIX, uuid=error)
|
message = _("This seems to be an invalid player - it doesn't have an entry on Mojang's API.\nTry running {PREFIX}[command] {uuid} False to search by UUID instead. Run {PREFIX}help bedwars for more info.").format(PREFIX=PREFIX, uuid=error)
|
||||||
elif isinstance(error, commands.errors.CommandNotFound):
|
elif isinstance(error, commands.errors.CommandNotFound):
|
||||||
message = _("command not found. Try {PREFIX}help for a list!")
|
message = _("command not found. Try {PREFIX}help for a list!").format(PREFIX=PREFIX)
|
||||||
else:
|
else:
|
||||||
message = "Unknown error !"
|
message = "Unknown error !"
|
||||||
em = discord.Embed(title=_("⚠️ Oops! ⚠️"), description=message)
|
em = discord.Embed(title=_("⚠️ Oops! ⚠️"), description=message)
|
||||||
|
|
Loading…
Reference in New Issue