diff --git a/assets/assfont.ttf b/assets/assfont.ttf
new file mode 100644
index 00000000..1070aacd
Binary files /dev/null and b/assets/assfont.ttf differ
diff --git a/assets/kertas.jpg b/assets/kertas.jpg
new file mode 100644
index 00000000..7b884031
Binary files /dev/null and b/assets/kertas.jpg differ
diff --git a/misskaty/plugins/filters.py b/misskaty/plugins/filters.py
index cfb155f4..420742a6 100644
--- a/misskaty/plugins/filters.py
+++ b/misskaty/plugins/filters.py
@@ -42,7 +42,7 @@ You can use markdown or html to save text too.
"""
-@app.on_message(filters.command("addfilter") & ~filters.private)
+@app.on_message(filters.command(["addfilter", "filter"]) & ~filters.private)
@adminsOnly("can_change_info")
@ratelimiter
async def save_filters(_, m):
@@ -77,7 +77,7 @@ async def get_filterss(_, m):
await m.reply_msg(msg)
-@app.on_message(filters.command("stopfilter") & ~filters.private)
+@app.on_message(filters.command(["stop", "stopfilter"]) & ~filters.private)
@adminsOnly("can_change_info")
@ratelimiter
async def del_filter(_, m):
diff --git a/misskaty/plugins/media_extractor.py b/misskaty/plugins/media_extractor.py
index cb290c0d..00037e98 100644
--- a/misskaty/plugins/media_extractor.py
+++ b/misskaty/plugins/media_extractor.py
@@ -45,6 +45,7 @@ __MODULE__ = "MediaExtract"
__HELP__ = """
/extractmedia [URL] - Extract subtitle or audio from video using link. (Not support TG File to reduce bandwith usage.)
/converttosrt [Reply to .ass or .vtt TG File] - Convert from .ass or .vtt to srt
+/converttoass [Reply to .srt or .vtt TG File] - Convert from .srt or .vtt to srt
"""
diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py
index ae58eb8a..63b50407 100644
--- a/misskaty/plugins/misc_tools.py
+++ b/misskaty/plugins/misc_tools.py
@@ -42,6 +42,8 @@ __HELP__ = """
/readqr [reply to photo] - Read QR Code From Photo.
/createqr [text] - Convert Text to QR Code.
/anime [query] - Search title in myanimelist.
+/info - Get info user with Pic and full description if user set profile picture.
+/id - Get simple user ID.
"""
@@ -252,7 +254,7 @@ async def topho(client, message):
@app.on_message(filters.command(["id"], COMMAND_HANDLER))
@ratelimiter
async def showid(client, message):
- chat_type = message.chat.type
+ chat_type = message.chat.type.value
if chat_type == "private":
user_id = message.chat.id
first = message.from_user.first_name
diff --git a/misskaty/plugins/notes.py b/misskaty/plugins/notes.py
index b825d531..bdba7d8d 100644
--- a/misskaty/plugins/notes.py
+++ b/misskaty/plugins/notes.py
@@ -36,15 +36,15 @@ from misskaty.helper.functions import extract_text_and_keyb
__MODULE__ = "Notes"
__HELP__ = """/notes To Get All The Notes In The Chat.
-/addnote [NOTE_NAME] To Save A Note (Can be a sticker or text).
+(/save, /addnote) [NOTE_NAME] To Save A Note (Can be a sticker or text).
#NOTE_NAME To Get A Note.
-/delnote [NOTE_NAME] To Delete A Note.
+(/clear, /delnote) [NOTE_NAME] To Delete A Note.
"""
-@app.on_message(filters.command("addnote") & ~filters.private)
+@app.on_message(filters.command(["addnote", "save"]) & ~filters.private)
@adminsOnly("can_change_info")
@ratelimiter
async def save_notee(_, message):
@@ -113,7 +113,7 @@ async def get_one_note(_, message):
await message.reply_sticker(_note["data"])
-@app.on_message(filters.command("delnote") & ~filters.private)
+@app.on_message(filters.command(["delnote", "clear"]) & ~filters.private)
@adminsOnly("can_change_info")
@ratelimiter
async def del_note(_, message):
diff --git a/misskaty/plugins/nulis.py b/misskaty/plugins/nulis.py
new file mode 100644
index 00000000..3ae4327b
--- /dev/null
+++ b/misskaty/plugins/nulis.py
@@ -0,0 +1,53 @@
+from misskaty import app
+from misskaty.vars import COMMAND_HANDLER
+from PIL import Image, ImageFont, ImageDraw
+
+__MODULE__ = "nulis"
+__HELP__ = f"""
+๏ Command: {cmd}nulis [reply to msg or after cmd]
+◉ Desc: For those of you who are lazy to write.
+"""
+
+def text_set(text):
+ lines = []
+ if len(text) <= 55:
+ lines.append(text)
+ else:
+ all_lines = text.split("\n")
+ for line in all_lines:
+ if len(line) <= 55:
+ lines.append(line)
+ else:
+ k = len(line) // 55
+ lines.extend(line[((z - 1) * 55) : (z * 55)] for z in range(1, k + 2))
+ return lines[:25]
+
+@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
+ elif message.command > 1:
+ naya = 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...")
+ try:
+ img = Image.open("assets/kertas.jpg")
+ draw = ImageDraw.Draw(img)
+ font = ImageFont.truetype("assets/assfont.ttf", 30)
+ x, y = 150, 140
+ lines = text_set(naya)
+ line_height = font.getsize("hg")[1]
+ for line in lines:
+ draw.text((x, y), line, fill=(1, 22, 55), font=font)
+ y = y + line_height - 5
+ file = f"nulis_{message.from_user.id}.jpg"
+ img.save(file)
+ if os.path.exists(file):
+ await message.reply_photo(
+ photo=file, caption=f"Written By : {client.me.mention}"
+ )
+ os.remove(file)
+ await nan.delete()
+ except Exception as e:
+ return await message.reply(e)