mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 01:57:47 +00:00
pmcaptcha 忽略机器人消息 (#8)
This commit is contained in:
parent
403d816a39
commit
eb481e7118
@ -72,7 +72,7 @@
|
||||
},
|
||||
{
|
||||
"name": "pmcaptcha",
|
||||
"version": "1.01",
|
||||
"version": "1.011",
|
||||
"section": "chat",
|
||||
"maintainer": "cloudreflection",
|
||||
"size": "9.33 kb",
|
||||
|
@ -38,9 +38,9 @@ async def process_pm_captcha(client: Client, message: Message):
|
||||
cid = message.chat.id
|
||||
data = sqlite.get("pmcaptcha", {})
|
||||
if not captcha_success.check_id(cid) and sqlite.get("pmcaptcha." + str(cid)) is None:
|
||||
# 忽略联系人和服务消息
|
||||
if message.from_user.is_contact or message.from_user.id == 777000:
|
||||
return captcha_success.add_id(cid)
|
||||
# 忽略联系人、服务消息、机器人消息
|
||||
if message.from_user.is_contact or message.from_user.id == 777000 or message.chat.type == ChatType.BOT:
|
||||
return
|
||||
await client.read_chat_history(message.chat.id)
|
||||
if data.get("blacklist", "") and message.text is not None:
|
||||
for i in data.get("blacklist", "").split(","):
|
||||
|
Loading…
Reference in New Issue
Block a user