From a9fa76f2f31a598b8b93a29fc49b10aa9f961565 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 6 Sep 2021 21:42:54 +0800 Subject: [PATCH] =?UTF-8?q?autoreplysticker=20fuckmember=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autoreplysticker.py | 8 ++++++-- fuckmember.py | 2 +- list.json | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/autoreplysticker.py b/autoreplysticker.py index 59d6f7e..0dda491 100644 --- a/autoreplysticker.py +++ b/autoreplysticker.py @@ -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: diff --git a/fuckmember.py b/fuckmember.py index 5a02a3b..91d6596 100644 --- a/fuckmember.py +++ b/fuckmember.py @@ -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: diff --git a/list.json b/list.json index 52821e5..61a9662 100644 --- a/list.json +++ b/list.json @@ -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",