autoreplysticker fuckmember 批量修复错误

This commit is contained in:
xtaodada 2021-09-06 21:42:54 +08:00
parent 4478768bc9
commit a9fa76f2f3
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
3 changed files with 9 additions and 5 deletions

View File

@ -63,8 +63,12 @@ async def ars_getall(message: Message) -> None:
sticker_pack_list = []
await sleep(2)
sendtext = '\n\n'.join(sticker_pack_list)
await message.client.send_message(message.chat_id, sendtext)
await message.delete()
try:
await message.client.send_message(message.chat_id, sendtext)
await message.delete()
except ValueError:
await message.client.send_message(message.chat_id, '您还没有添加贴纸包。')
await message.delete()
async def ars_help(message: Message) -> None:

View File

@ -34,7 +34,7 @@ async def fuck_member(context):
if day < 7:
day = 7
text += '由于输入的数据过小,时间自动设置为 7 天。\n'
except (KeyError or ValueError):
except (KeyError, ValueError):
day = 7
text += '由于输入的数据错误,时间自动设置为 7 天。\n'
else:

View File

@ -372,7 +372,7 @@
},
{
"name": "autoreplysticker",
"version": "1.231",
"version": "1.232",
"section": "chat",
"maintainer": "Pentacene",
"size": "12 kb",
@ -592,7 +592,7 @@
},
{
"name": "fuckmember",
"version": "1.032",
"version": "1.033",
"section": "daily",
"maintainer": "xtaodada",
"size": "3.0 kb",