upload meme as an attachment

ive not tested this
This commit is contained in:
xfnw 2021-11-22 16:47:52 -05:00
parent ae31406805
commit 6dbec42227

4
bot.py
View file

@ -161,7 +161,9 @@ async def meme(ctx):
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get('https://api.shitfest.net/v2/random.php') as resp: async with session.get('https://api.shitfest.net/v2/random.php') as resp:
json = await resp.json() json = await resp.json()
await ctx.send(json["mp4"]) async with session.get(json["mp4"]) as mp4:
file = File(io.BytesIO(await mp4.read()))
await ctx.send("m e m e", file=file)
@bot.command(brief='makes things gay') @bot.command(brief='makes things gay')