diff --git a/8ballcommands.txt b/8ballcommands.txt new file mode 100644 index 00000000..e69de29b diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 657d8d64..3e1c92c6 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -72,7 +72,12 @@ class Fun(commands.Cog): @commands.command(aliases=['8ball', '8Ball']) @cooldown(1, 5, BucketType.channel) async def _8ball(self, ctx, *, question): + channels = ["bot-commands"] + + with open('kakashiImages.txt') as file: + _8ball_array = file.readlines() + if str(ctx.channel) not in channels: message = await ctx.send(error_function()) diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index bda0f8b3..d7f306e9 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -28,10 +28,13 @@ class Waifus(commands.Cog): kakashi_array = file.readlines() if str(ctx.channel) in channels: + embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), ) embed.set_image(url=random.choice(kakashi_array)) await ctx.send(embed=embed) + file.close() + def error_function(): return "Sorry! I only work in #bot-commands!"