diff options
author | 2020-03-12 22:18:24 +0530 | |
---|---|---|
committer | 2020-03-12 22:18:24 +0530 | |
commit | f2d10e46e44b4d4cdd3dc343a2462ba00d654409 (patch) | |
tree | cc0c5ae76f257b76f51ee91efffc37db1bf27a75 | |
parent | Update ytdl tag to the new YouTube ToS (diff) |
remove repetitive file search
-rw-r--r-- | bot/cogs/tags.py | 5 |
1 files 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 |