Fixed error handling for commands that only use the default error msgs
+ Fixes errors from the `me` commandmaster
parent
6a45fe217a
commit
4858cccf2e
|
@ -36,7 +36,7 @@ async def run_command(ctx, base_url, api_token, request_type, command, errors=No
|
|||
|
||||
if "error" in json:
|
||||
error_name = json["error"]
|
||||
if error_name in errors:
|
||||
if (errors is not None) and (error_name in errors):
|
||||
msg = errors[error_name]
|
||||
elif error_name in default_error_messages:
|
||||
msg = default_error_messages[error_name]
|
||||
|
|
Loading…
Reference in New Issue