From 5830f700ef33d986d2ecce34cd8057f7cb69007c Mon Sep 17 00:00:00 2001 From: sgoudham Date: Thu, 4 Jun 2020 04:25:55 +0100 Subject: [PATCH] -Got the footer text and footer icon url working! --- cogs/WaifuImages.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index dff2e0ff..b6603bf2 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -22,10 +22,12 @@ class Waifus(commands.Cog): if str(ctx.channel) in channels: - avatar = ctx.avatar_url + member = ctx.message.author # set member as the author + userAvatar = member.avatar_url + embed = discord.Embed(title="**Kakashi**", colour=discord.Colour(0xff0000)) embed.set_image(url=random.choice(kakashi_array)) - embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url=f"{avatar}") + embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) await ctx.send(embed=embed) else: message = await ctx.send(error_function()) @@ -49,10 +51,12 @@ class Waifus(commands.Cog): if str(ctx.channel) in channels: - avatar = ctx.avatar_url + member = ctx.message.author # set member as the author + userAvatar = member.avatar_url + embed = discord.Embed(title="**Toga**", colour=discord.Colour(0xff0000)) embed.set_image(url=random.choice(toga_array)) - embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url=f"{avatar}") + embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) await ctx.send(embed=embed) else: message = await ctx.send(error_function())