From 87871bd3511a93f9980f34f334d11d751a608e55 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Wed, 6 Oct 2021 10:49:18 -0700 Subject: [PATCH] [Dictionary] Fix for non-words on syn & ant --- dictionary/dictionary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dictionary/dictionary.py b/dictionary/dictionary.py index 74e9739..3c12f7e 100644 --- a/dictionary/dictionary.py +++ b/dictionary/dictionary.py @@ -139,7 +139,10 @@ class Dictionary(commands.Cog): final = [] if website_data: - syn_list = website_data["searchData"]["tunaApiData"]["posTabs"][0][lookup_type] + tuna_api_data = website_data["searchData"]["tunaApiData"] + if not tuna_api_data: + return None + syn_list = tuna_api_data["posTabs"][0][lookup_type] for syn in syn_list: final.append(syn["term"])