def sfp(self, ctx, user: discord.Member=None):
"""Super Falcon Punch"""
author = ctx.message.author
if not user:
await self.bot.say("{} has Super Falcon Punched!".format(author.mention))
with aiohttp.ClientSession() as session:
async with session.get("https://cdn.discordapp.com/attachments/172354611477348352/193299243539234817/imgres.jpg") as resp:
test = await resp.read()
with open("data/commands/Images/imgres.png", "wb") as f:
f.write(test)
await self.bot.upload("data/commands/Images/imgres.png")
else:
await self.bot.say("{} has Super Falcon Punched {} and blew him away!".format(author.mention, user.mention))
with aiohttp.ClientSession() as session:
async with session.get("https://cdn.discordapp.com/attachments/172354611477348352/193299243539234817/imgres.jpg") as resp:
test = await resp.read()
with open("data/commands/Images/imgres.png", "wb") as f:
f.write(test)
await self.bot.upload("data/commands/Images/imgres.png")
评论列表
文章目录