aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/tags.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py
index 9c897ad36..bb74ab1ca 100644
--- a/bot/cogs/tags.py
+++ b/bot/cogs/tags.py
@@ -49,8 +49,7 @@ class Tags(Cog):
"restricted_to": "developers"
}
if len(file_path) == 5:
- restricted_to = file_path[3]
- tag["restricted_to"] = restricted_to
+ tag["restricted_to"] = file_path[3]
cache[tag_title] = tag
return cache
@@ -127,9 +126,11 @@ class Tags(Cog):
matching_tags = []
for tag in self._cache.values():
- if self.check_accessibility(user, tag):
- if check(query in tag['embed']['description'].casefold() for query in keywords_processed):
- matching_tags.append(tag)
+ if (
+ self.check_accessibility(user, tag)
+ and check(query in tag['embed']['description'].casefold() for query in keywords_processed)
+ ):
+ matching_tags.append(tag)
return matching_tags