From 3c7481458c1a5c8469c68cd3f1dc03e87112b633 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Fri, 29 Jan 2021 09:46:19 -0600 Subject: [PATCH] Timings - Catch TypeError --- cogs/timings_public.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cogs/timings_public.py b/cogs/timings_public.py index b4bc7e8..f271ab8 100644 --- a/cogs/timings_public.py +++ b/cogs/timings_public.py @@ -317,6 +317,11 @@ def eval_field(embed_var, option, option_name, plugins, server_properties, bukki print(value_error) embed_var.add_field(name="❗ Value Error", value=f'`{value_error}`\nexpression:\n`{expression}`\noption:\n`{option_name}`') + except TypeError as type_error: + add_to_field = False + print(type_error) + embed_var.add_field(name="❗ Type Error", + value=f'`{type_error}`\nexpression:\n`{expression}`\noption:\n`{option_name}`') for config_name in dict_of_vars: if config_name in option_data["value"] and not dict_of_vars[config_name]: add_to_field = False