Trying to fix Student Jon command

pull/2/head
sgoudham 4 years ago
parent c8250899a5
commit 89f171a964

@ -165,16 +165,28 @@ class Waifus(commands.Cog):
def displayServerImage(array, ctx, name): def displayServerImage(array, ctx, name):
if str(ctx.channel) in channels: if str(ctx.channel) in channels:
# set member as the author if name is 'studentjon':
member = ctx.message.author # set member as the author
userAvatar = member.avatar_url member = ctx.message.author
userAvatar = member.avatar_url
embed = discord.Embed(
title=f"**Oh Look! A Cute Picture of {name.capitalize()}!! <a:huh:676195228872474643> <a:huh:676195228872474643> **", embed = discord.Embed(
colour=discord.Colour(random.choice(colour_list))) title=f"**Oh Look! A Cute Picture of Student Jon!! <a:huh:676195228872474643> <a:huh:676195228872474643> **",
embed.set_image(url=random.choice(array)) colour=discord.Colour(random.choice(colour_list)))
embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.set_image(url=random.choice(array))
embed.timestamp = datetime.datetime.utcnow() embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar))
embed.timestamp = datetime.datetime.utcnow()
else:
# set member as the author
member = ctx.message.author
userAvatar = member.avatar_url
embed = discord.Embed(
title=f"**Oh Look! A Cute Picture of {name.capitalize()}!! <a:huh:676195228872474643> <a:huh:676195228872474643> **",
colour=discord.Colour(random.choice(colour_list)))
embed.set_image(url=random.choice(array))
embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar))
embed.timestamp = datetime.datetime.utcnow()
return embed return embed

Loading…
Cancel
Save