【发布时间】:2021-04-16 21:34:22
【问题描述】:
因此,每当我尝试执行此命令时,它都会成功运行,但文本会覆盖而不是在其上粘贴空的火车模因模板
@client.command()
async def trainmeme(ctx, *, text):
text = text.split(",")
text2 = text[0]
text3 = text[1]
img = Image.open("train.jpg")
draw = ImageDraw.Draw(img)
drawer = ImageDraw.Draw(img)
font = ImageFont.truetype("Arimo.ttf", 50)
drawer.text((197, 165), text=text2, font=font)
draw.text((87, 531), text=text3, font=font)
img.save("train.jpg")
img.paste(img, (7, 5))
await ctx.send(file = discord.File("train.jpg"))
这是我尝试多次执行该命令时发生的情况的图片
【问题讨论】:
标签: python discord python-imaging-library