From 4858cccf2e0f7b89aac47c102e31f7e49189e763 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Wed, 2 Oct 2019 08:21:24 -0500 Subject: [PATCH] Fixed error handling for commands that only use the default error msgs + Fixes errors from the `me` command --- GeoffreyBot/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeoffreyBot/util.py b/GeoffreyBot/util.py index f4ed828..e034c33 100644 --- a/GeoffreyBot/util.py +++ b/GeoffreyBot/util.py @@ -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]