diff --git a/list.json b/list.json index 03ab5b7..79a0090 100644 --- a/list.json +++ b/list.json @@ -152,13 +152,13 @@ }, { "name": "portball", - "version": "1.21", + "version": "1.22", "section": "chat", "maintainer": "Pentacene", "size": "3.6 kb", "supported": true, "des-short": "回复你要临时禁言的人的消息来实现XX秒的禁言。", - "des": "这个人很懒,什么都没有留下。" + "des": "portball 原因 秒数" }, { "name": "resou", diff --git a/portball.py b/portball.py index 285af32..52ed965 100644 --- a/portball.py +++ b/portball.py @@ -18,6 +18,15 @@ async def portball(context): last_name = '' else: last_name = reply.sender.last_name + if len(action) < 2: + notification = await bot.send_message(context.chat_id, '格式是\n-portball 理由 秒数\n真蠢', reply_to = context.id) + await sleep(10) + await notification.delete() + try: + await context.delete() + except: + pass + return False if int(action[1])<60: notification = await bot.send_message(context.chat_id, '诶呀不要小于60秒啦', reply_to = context.id) await sleep(10)