diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index c1066a9a..29a32f2c 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -101,13 +101,11 @@ class Fun(commands.Cog): @cooldown(1, 0.5, BucketType.channel) async def kissing(self, ctx, target: discord.Member): - channels = ["bot-commands", "picto-chat", "general"] + channels = ["bot-commands", "picto-chat"] try: if str(ctx.channel) in channels: - # path = PurePath('Ensobot', 'kissing.txt') - # path = PureWindowsPath('C:', 'Users', 'sgoud' 'PycharmProjects', 'EnsoBot', 'images', 'kissing.txt') with open('images/kissing.txt') as file: kissing_array = file.readlines() @@ -135,6 +133,42 @@ class Fun(commands.Cog): except FileNotFoundError as e: print(e) + @commands.command(aliases=["Cuddle", "cdle", "cud"]) + @cooldown(1, 0.5, BucketType.channel) + async def cuddle(self, ctx, target: discord.Member): + + channels = ["bot-commands", "picto-chat"] + + try: + if str(ctx.channel) in channels: + + with open('images/cuddling.txt') as file: + cuddling_array = file.readlines() + + # set member as the author + member = ctx.message.author + userAvatar = member.avatar_url + + embed = discord.Embed( + title=f" | **{member.display_name}** cuddles **{target.display_name}**", + colour=discord.Colour(int(random.choice(colours)))) + embed.set_image(url=random.choice(cuddling_array)) + embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) + embed.timestamp = datetime.datetime.utcnow() + + await ctx.send(embed=embed) + + else: + + message = await ctx.send(error_function()) + + # Let the user read the message for 2.5 seconds + await asyncio.sleep(2.5) + # Delete the message + await message.delete() + except FileNotFoundError as e: + print(e) + # Bot ~8Ball command @commands.command(aliases=['8ball', '8Ball']) @cooldown(1, 0.5, BucketType.channel) diff --git a/images/cuddling.txt b/images/cuddling.txt new file mode 100644 index 00000000..fc7686c1 --- /dev/null +++ b/images/cuddling.txt @@ -0,0 +1 @@ +https://tenor.com/view/anime-cuddle-me-cuteanimeboy-hug-gif-13317505