forked from IPD/Foxtrot
attach meme as a file
i have not actually tested this lol
This commit is contained in:
parent
ae31406805
commit
7dde78571b
1 changed files with 3 additions and 2 deletions
5
bot.py
5
bot.py
|
@ -5,7 +5,6 @@ from discord import File, Streaming, Game, Activity, ActivityType, Status
|
|||
from discord.ext import commands, tasks
|
||||
import io, aiohttp, asyncio, json, random, logging, requests
|
||||
|
||||
|
||||
foxmsgs = [
|
||||
'floofy fox',
|
||||
'here fops',
|
||||
|
@ -161,7 +160,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(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')
|
||||
|
|
Loading…
Reference in a new issue