diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 2145e07d..1f165ba5 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -1,5 +1,4 @@ import asyncio -import pathlib import random import discord @@ -96,8 +95,8 @@ class Fun(commands.Cog): channels = ["bot-commands"] - path = pathlib.Path(r'C:/Users/sgoud/PycharmProjects/EnsoBot/txtfiles/eightball.txt') - with open(path) as file: + # path = pathlib.Path(r'C:/Users/sgoud/PycharmProjects/EnsoBot/txtfiles/eightball.txt') + with open('eightball.txt') as file: _8ball_array = file.readlines() if str(ctx.channel) in channels: @@ -111,8 +110,6 @@ class Fun(commands.Cog): # Delete the message await message.delete() - file.close() - def error_function(): return "Sorry! I only work in #bot-commands!" diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index 4f330444..a3b7b0b9 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -39,8 +39,6 @@ class Waifus(commands.Cog): # Delete the message await message.delete() - file.close() - # Bot ~Toga command for Josh @commands.command(aliases=['Toga']) @cooldown(1, 0, BucketType.channel)