mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-16 04:35:55 +00:00
♻️ 修改复读判断方式
This commit is contained in:
parent
0b5b1a5f80
commit
dd8aef67f5
@ -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]:
|
||||||
|
Loading…
Reference in New Issue
Block a user