fix: without command

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618
2024-06-15 15:55:16 +08:00
parent b9ed871d58
commit bd202851e0
2 changed files with 8 additions and 2 deletions

View File

@ -66,7 +66,13 @@ def md_handler(message: Message, bot: TeleBot):
def latest_handle_messages(message: Message, bot: TeleBot):
"""ignore"""
chat_id = message.chat.id
chat_message_dict[chat_id] = message
# if is bot command, ignore
if message.text.startswith("/"):
return
elif message.text.startswith(("md", "chatgpt", "gemini", "qwen", "map", "github", "claude", "llama", "dify", "tts", "sd", "map", "yi")):
return
else:
chat_message_dict[chat_id] = message
def answer_it_handler(message: Message, bot: TeleBot):