diff --git a/commands/meme.py b/commands/meme.py index 2e03bb9..7abab4a 100644 --- a/commands/meme.py +++ b/commands/meme.py @@ -41,10 +41,14 @@ class meme(commands.Cog): async with session.get("https://reddit-meme.p.rapidapi.com/memes/trending") as response: response = requests.request("GET", url, headers=headers) - embed = discord.Embed(title=response.json()['title'], color=discord.Color.random()) - await ctx.send(embed=embed) - - await ctx.send(response.json()) + json_data = json.loads(response.text) + meme = json_data["postLink"] + title = json_data["title"] + image = json_data["url"] + em = discord.Embed(title=title, color=ctx.author.color) + em.set_image(url=image) + em.set_footer(text=meme) + await ctx.send(embed=em) async def setup(bot): await bot.add_cog(meme(bot)) \ No newline at end of file