mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 02:24:52 +00:00
Fix
This commit is contained in:
parent
9656803fcc
commit
bd2c4b91b2
1 changed files with 4 additions and 4 deletions
|
|
@ -3,7 +3,7 @@ from misskaty.vars import COMMAND_HANDLER
|
|||
from PIL import Image, ImageFont, ImageDraw
|
||||
|
||||
__MODULE__ = "nulis"
|
||||
__HELP__ = f"""
|
||||
__HELP__ = """
|
||||
๏ Command: <code>/nulis</code> [reply to msg or after cmd]
|
||||
◉ Desc: For those of you who are lazy to write.
|
||||
"""
|
||||
|
|
@ -25,9 +25,9 @@ def text_set(text):
|
|||
@app.on_message(filters.command(["nulis"], COMMAND_HANDLER))
|
||||
async def handwrite(client, message):
|
||||
if message.reply_to_message and message.reply_to_message.text:
|
||||
naya = message.reply_to_message.text
|
||||
txt = message.reply_to_message.text
|
||||
elif message.command > 1:
|
||||
naya = message.text.split(None, 1)[1]
|
||||
txt = message.text.split(None, 1)[1]
|
||||
else:
|
||||
return await message.reply("Please reply to message or write after command to use Nulis CMD.")
|
||||
nan = await message.reply_msg("Processing...")
|
||||
|
|
@ -36,7 +36,7 @@ async def handwrite(client, message):
|
|||
draw = ImageDraw.Draw(img)
|
||||
font = ImageFont.truetype("assets/assfont.ttf", 30)
|
||||
x, y = 150, 140
|
||||
lines = text_set(naya)
|
||||
lines = text_set(txt)
|
||||
line_height = font.getsize("hg")[1]
|
||||
for line in lines:
|
||||
draw.text((x, y), line, fill=(1, 22, 55), font=font)
|
||||
|
|
|
|||
Loading…
Reference in a new issue