From f2d10e46e44b4d4cdd3dc343a2462ba00d654409 Mon Sep 17 00:00:00 2001 From: RohanJnr Date: Thu, 12 Mar 2020 22:18:24 +0530 Subject: remove repetitive file search --- bot/cogs/tags.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index 9665aa04e..692cff0d8 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -36,12 +36,11 @@ class Tags(Cog): cache = {} tag_files = Path("bot", "resources", "tags").iterdir() for file in tag_files: - file_path = Path(file) - tag_title = file_path.stem + tag_title = file.stem tag = { "title": tag_title, "embed": { - "description": file_path.read_text() + "description": file.read_text() } } cache[tag_title] = tag -- cgit v1.2.3