pmcaptcha 帮助仅私聊可用

This commit is contained in:
xtaodada 2022-06-14 14:45:52 +08:00
parent ea167f7b7d
commit 33ca7c85c8
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,7 @@
},
{
"name": "pmcaptcha",
"version": "1.14",
"version": "1.141",
"section": "chat",
"maintainer": "cloudreflection",
"size": "13 kb",

View File

@ -185,6 +185,10 @@ async def pm_captcha(client: Client, message: Message):
await message.edit(
'当前验证等待时间(秒): ' + str(data.get('wait', '')) + '\n如需编辑,请使用 ,pmcaptcha wait +等待秒数(整数)')
elif message.parameter[0] == 'h':
if message.chat.type != ChatType.PRIVATE:
await message.edit('请在私聊时使用此命令')
await asyncio.sleep(3)
return await message.safe_delete()
await message.edit(pm_captcha_help_msg)
elif message.parameter[0] == 'disablepm':
if data.get('disable', False):