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