@client.command()
async def shit(ctx, *, response=None):
if response == None:
await ctx.send("What am I gonna write lol")
response = response.replace("(", "")
response = response.replace(")", "")
txt = Image.new('L', (500, 50))
img = Image.open("img/shit-empty.jpg")
draw = ImageDraw.Draw(img)
w = txt.rotate(17.5, expand=1)
font = ImageFont.truetype("Roboto-Bold.ttf", 50)
# draw.text((x, y),"Sample Text",(r,g,b))
draw.text((315, 845), f"{response}", font=font)
img.paste(ImageOps.colorize(w, (0, 0, 0), (255,255,84)), (242,60), w)
img.save('img/shit.jpg')
await ctx.send(":poop: Eww")
await ctx.send(file=discord.File("img/shit.jpg"))
So this is the code of one of my image editing commands. It works fine but it gives like this:
I want to rotate the text as it would match with the shoe rotation, how can i do that?