yihong0618 785b75e994 feat: use expire dict
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-06-14 18:55:20 +08:00

20 lines
516 B
Python

# 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 = ""
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)