Adding commentary

pull/8/head
sgoudham 4 years ago
parent 23a4db04ea
commit 96ec925bd3

@ -55,16 +55,20 @@ class Fun(commands.Cog):
"""Allows people to summon the homies"""
try:
# Make sure the text entered is less than 20 characters
if len(user_word) >= 20:
await ctx.send("Please make sure the prompt is below **20** characters!")
return
else:
# Define the text to be drawn on the top and the bottom
top_text = f"Ayo fuck {user_word}"
bottom_text = f"All my homies hate {user_word}"
# Call the method to generate the image
generate_meme('homies/AllMyHomies.jpg', top_text=top_text, bottom_text=bottom_text)
# Send the image file stored in the directory
await ctx.send(file=discord.File('AllMyHomiesHateMeme.jpg'))
except Exception as e:
print(e)

Loading…
Cancel
Save