Finished meme
This commit is contained in:
parent
adee477e90
commit
2ae7cbf3e9
@ -43,16 +43,18 @@ class meme(commands.Cog):
|
|||||||
async with session.get("https://reddit-meme.p.rapidapi.com/memes/trending") as response:
|
async with session.get("https://reddit-meme.p.rapidapi.com/memes/trending") as response:
|
||||||
response = requests.request("GET", url, headers=headers)
|
response = requests.request("GET", url, headers=headers)
|
||||||
|
|
||||||
await ctx.send(response.json())
|
|
||||||
"""
|
|
||||||
json_data = json.loads(response.text)
|
json_data = json.loads(response.text)
|
||||||
new_data = json_data[0]
|
description = json_data["description"]
|
||||||
title = new_data["title"]
|
url = json_data["url"]
|
||||||
image = new_data["url"]
|
|
||||||
em = discord.Embed(title=title, color=ctx.author.color)
|
embed = discord.Embed(
|
||||||
em.set_image(url=image)
|
title="Meme",
|
||||||
await ctx.send(embed=em)
|
description=description,
|
||||||
"""
|
color=ctx.author.color
|
||||||
|
)
|
||||||
|
embed.set_image(url=url)
|
||||||
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
await bot.add_cog(meme(bot))
|
await bot.add_cog(meme(bot))
|
Loading…
Reference in New Issue
Block a user