Compare commits

...

2 commits

Author SHA1 Message Date
90370ea280 Merge pull request 'upload meme as an attachment' (#2) from xfnw/Foxtrot:unstable into unstable
Reviewed-on: Helixu/Foxtrot#2
2021-11-22 22:08:46 +00:00
49a4c10d0d upload meme as an attachment
ive not tested this
2021-11-22 16:59:36 -05:00

4
bot.py
View file

@ -161,7 +161,9 @@ async def meme(ctx):
async with aiohttp.ClientSession() as session:
async with session.get('https://api.shitfest.net/v2/random.php') as resp:
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')