feat: yi large and md

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618
2024-05-13 14:03:04 +08:00
parent 55fd800eb1
commit 77fefcb4b5
5 changed files with 101 additions and 6 deletions

19
handlers/useful.py Normal file
View File

@ -0,0 +1,19 @@
# useful md for myself and you.
from telebot import TeleBot
from telebot.types import Message
from . import *
def md_handler(message: Message, bot: TeleBot):
"""pretty md: /md <address>"""
who = "Markdown"
reply_id = bot_reply_first(message, who, bot)
bot_reply_markdown(reply_id, who, message.text.strip(), bot)
def register(bot: TeleBot) -> None:
bot.register_message_handler(md_handler, commands=["md"], pass_bot=True)
bot.register_message_handler(md_handler, regexp="^md:", pass_bot=True)