async def trigger(self, ctx, *, member:discord.Member=None): """Triggers a user""" await ctx.channel.trigger_typing() if member is None: member = ctx.author download_file(get_avatar(member, animate=False), "data/trigger.png") avatar = Image.open("data/trigger.png") triggered = imagetools.rescale(Image.open("assets/imgs/pillow/triggered.jpg"), avatar.size) position = 0, avatar.getbbox()[3] - triggered.getbbox()[3] avatar.paste(triggered, position) avatar.save("data/trigger.png") await ctx.send(file=discord.File("data/trigger.png"))
async def trigger(self, ctx, *, member: discord.Member = None): await ctx.channel.trigger_typing() if member is None: member = ctx.author download_file(get_avatar(member, animate=False), "data/trigger.png") avatar = Image.open("data/trigger.png") triggered = imagetools.rescale( Image.open("assets/imgs/pillow/triggered.jpg"), avatar.size) position = 0, avatar.getbbox()[3] - triggered.getbbox()[3] avatar.paste(triggered, position) avatar.save("data/trigger.png") await ctx.send(file=discord.File("data/trigger.png"))
async def trigger(self, ctx, *, member: discord.Member = None): """Triggers a user""" await self.bot.send_typing(ctx.message.channel) if member is None: member = ctx.message.author download_file(get_avatar(member, animate=False), "data/trigger.png") avatar = Image.open("data/trigger.png") triggered = imagetools.rescale( Image.open("assets/imgs/pillow/triggered.jpg"), avatar.size) position = 0, avatar.getbbox()[3] - triggered.getbbox()[3] avatar.paste(triggered, position) avatar.save("data/trigger.png") await self.bot.send_file(ctx.message.channel, "data/trigger.png")
async def trigger(ctx, member: discord.Member = None): print('triggered') if member is None: member = ctx.message.author download_file(get_avatar(member, animate=False), "data/trigger.png") avatar = Image.open("data/trigger.png") triggered = imagetools.rescale(Image.open("assets/imgs/triggered.jpg"), avatar.size) position = 0, avatar.getbbox()[3] - triggered.getbbox()[3] avatar.paste(triggered, position) avatar.save("data/trigger.png") await bot.send_file(ctx.message.channel, r"data/trigger.png", filename="triggered.png")