Answer the question
In order to leave comments, you need to log in
I want to move half a line to another line so that the text fits. How can I do this?
@bot.command()
async def drake(ctx, *, text):
if len(text) > 45:
return await ctx.send(embed=discord.Embed(title='Произошла ошибка!', description=f'<:error:852403860765016097> {ctx.author.mention} ваш текст больше 45 символов!!',color=error))
text = text.split(";")
text2 = text[0]
text3 = text[1]
img = Image.open("drake.jpg")
draw = ImageDraw.Draw(img)
drawer = ImageDraw.Draw(img)
font = ImageFont.truetype("9303.ttf", 48)
drawer.text((355, 150), text=text2, fill='black',font=font)
draw.text((342, 470), text=text3,fill='black',font=font)
img.save("drake2.jpg")
img.paste(img, (7, 5))
await ctx.send(file = discord.File("drake2.jpg"))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question