Testing github repo

testing
sgoudham 5 years ago
parent 08838fdabf
commit 8f3f17fb5f

@ -72,7 +72,12 @@ class Fun(commands.Cog):
@commands.command(aliases=['8ball', '8Ball']) @commands.command(aliases=['8ball', '8Ball'])
@cooldown(1, 5, BucketType.channel) @cooldown(1, 5, BucketType.channel)
async def _8ball(self, ctx, *, question): async def _8ball(self, ctx, *, question):
channels = ["bot-commands"] channels = ["bot-commands"]
with open('kakashiImages.txt') as file:
_8ball_array = file.readlines()
if str(ctx.channel) not in channels: if str(ctx.channel) not in channels:
message = await ctx.send(error_function()) message = await ctx.send(error_function())

@ -28,10 +28,13 @@ class Waifus(commands.Cog):
kakashi_array = file.readlines() kakashi_array = file.readlines()
if str(ctx.channel) in channels: if str(ctx.channel) in channels:
embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), ) embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), )
embed.set_image(url=random.choice(kakashi_array)) embed.set_image(url=random.choice(kakashi_array))
await ctx.send(embed=embed) await ctx.send(embed=embed)
file.close()
def error_function(): def error_function():
return "Sorry! I only work in #bot-commands!" return "Sorry! I only work in #bot-commands!"

Loading…
Cancel
Save