From 601400a73ea09019af65d78ec45d1dcfe4229bec Mon Sep 17 00:00:00 2001 From: D0rs4n <41237606+D0rs4n@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:24:54 +0200 Subject: Adjust code transparency in the Wikipedia Cog Co-authored-by: Bluenix --- bot/exts/evergreen/wikipedia.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bot') diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py index 1b75f802..9397568d 100644 --- a/bot/exts/evergreen/wikipedia.py +++ b/bot/exts/evergreen/wikipedia.py @@ -58,9 +58,8 @@ class WikipediaSearch(commands.Cog): log.error(f"There was an error while communicating with the Wikipedia API: {error}") raise APIError("Wikipedia API", status, error) - number_of_results = raw_data["query"]["searchinfo"]["totalhits"] lines = [] - if number_of_results: + if raw_data["query"]["searchinfo"]["totalhits"]: results = raw_data["query"]["search"] for article in results: -- cgit v1.2.3