From 2dbe421be01719f4fa0958973da220fd9cd7f004 Mon Sep 17 00:00:00 2001 From: Abigail Gold Date: Sat, 5 Oct 2019 20:30:46 -0400 Subject: [PATCH] fix file handler thingy --- cogs/hamcog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/hamcog.py b/cogs/hamcog.py index aa57c40..614dbd6 100644 --- a/cogs/hamcog.py +++ b/cogs/hamcog.py @@ -20,7 +20,8 @@ class HamCog(commands.Cog): self.gs = bot.get_cog("GlobalSettings") with open('resources/qcodes.json') as qcode_file: self.qcodes = json.load(qcode_file) - self.WORDS = open('resources/words').read().lower().splitlines() + with open('resources/words') as words_file: + self.WORDS = words_file.read().lower().splitlines() @commands.command(name="qcode", aliases=['q']) async def _qcode_lookup(self, ctx, q : str):