upload meme as an attachment #2
1 changed files with 3 additions and 1 deletions
4
bot.py
4
bot.py
|
@ -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(f"https://buckets.cat.casa/memestorage/mp4/{json['mp4_hash']}.mp4") as mp4:
|
||||||
|
file = File(io.BytesIO(await mp4.read()), filename=json['name']+'.mp4')
|
||||||
|
await ctx.send("m e m e", file=file)
|
||||||
|
|
||||||
|
|
||||||
@bot.command(brief='makes things gay')
|
@bot.command(brief='makes things gay')
|
||||||
|
|
Loading…
Reference in a new issue