♻️ 修改复读判断方式

This commit is contained in:
xtaodada 2022-11-07 20:43:02 +08:00
parent 0b5b1a5f80
commit dd8aef67f5
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -1,5 +1,3 @@
import re
from pyrogram import Client, filters, ContinuePropagation from pyrogram import Client, filters, ContinuePropagation
from pyrogram.types import Message from pyrogram.types import Message
@ -26,7 +24,7 @@ async def repeater_handler(client: Client, message: Message):
msg = t_msg = message.text msg = t_msg = message.text
if not msg: if not msg:
raise ContinuePropagation raise ContinuePropagation
if re.match(r"^/", msg) or re.match(r"^!", msg): if msg.startswith("/") or msg.startswith("!") or msg.startswith(",") or msg.startswith(""):
raise ContinuePropagation raise ContinuePropagation
if msg != last_msg[group_id] or msg == last_repeat_msg[group_id]: if msg != last_msg[group_id] or msg == last_repeat_msg[group_id]: