forked from IPD/Foxtrot
added gay, currently only gays your profile picture, until i find out how to do it with images the author sends.
This commit is contained in:
parent
93fcf25d67
commit
e79a2b3d0f
1 changed files with 20 additions and 8 deletions
28
bot.py
28
bot.py
|
@ -135,15 +135,27 @@ async def meme(ctx):
|
||||||
json = await resp.json()
|
json = await resp.json()
|
||||||
await ctx.send(json["url"])
|
await ctx.send(json["url"])
|
||||||
|
|
||||||
#@bot.command()
|
|
||||||
#async def help(ctx):
|
|
||||||
# await ctx.send("""The current list of commands are:
|
|
||||||
#fox (Gets an image of a fox)
|
|
||||||
#activity (Sets bot activity, only works if you are a developer)
|
|
||||||
#invite (Gives bot invite link)
|
|
||||||
#help (this)
|
|
||||||
#""")
|
|
||||||
|
|
||||||
|
@bot.command(brief='makes things gay')
|
||||||
|
async def gay(ctx, member: discord.Member=None):
|
||||||
|
member = member or ctx.author
|
||||||
|
await ctx.trigger_typing()
|
||||||
|
async with aiohttp.ClientSession() as session:
|
||||||
|
async with session.get(
|
||||||
|
f'https://some-random-api.ml/canvas/gay?avatar={member.avatar_url_as(format="png")}'
|
||||||
|
) as af:
|
||||||
|
if 300 > af.status >= 200 :
|
||||||
|
fp = io.BytesIO(await af.read())
|
||||||
|
file = discord.File(fp, "gay.png")
|
||||||
|
embed = discord.Embed(
|
||||||
|
title="gaaaaaay",
|
||||||
|
color=0xf1f1f1,
|
||||||
|
)
|
||||||
|
embed.set_image(url="attachment://gay.png")
|
||||||
|
await ctx.send(embed=embed, file=file)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
|
|
Loading…
Reference in a new issue