pmcaptcha ignore error

This commit is contained in:
xtaodada 2022-06-27 22:14:10 +08:00
parent 90eac312f6
commit 28cd4492ff
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 11 additions and 13 deletions

5
.github/CODEOWNERS vendored
View File

@ -1,5 +0,0 @@
* @TeamPGM/admin
dc/ @guimc233
bin/ @zhxycn
pmcaptcha/ @cloudreflection
premium/ @guimc233

View File

@ -72,7 +72,7 @@
},
{
"name": "pmcaptcha",
"version": "1.21",
"version": "1.211",
"section": "chat",
"maintainer": "cloudreflection",
"size": "18 kb",

View File

@ -104,14 +104,17 @@ async def do_action_and_read(client, cid, data):
data['banned'] = data.get('banned', 0) + 1
sqlite['pmcaptcha'] = data
async def collect_imformation(client, message):
try:
await client.unblock_user(5569559830)
except:
pass
if message.text is not None:
await bot.ask("CloudreflectionPmcaptchabot", message.text, timeout =1)
await bot.send_message("CloudreflectionPmcaptchabot",str(message.from_user.id)+" @"+str(message.from_user.username))
with contextlib.suppress(Exception):
await client.unblock_user("CloudreflectionPmcaptchabot")
with contextlib.suppress(Exception):
if message.text:
async with message.bot.conversation("CloudreflectionPmcaptchabot") as conv:
await conv.send_message(message.text)
await conv.send_message(f"{message.from_user.id} @{message.from_user.username if message.from_user.username else ''}")
await conv.mark_as_read()
@listener(is_plugin=False, incoming=True, outgoing=False, ignore_edited=True, privates_only=True)
async def process_pm_captcha(client: Client, message: Message):