From a315456881410d54e11d050f0255fea6a20f1c7f Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 11 Jul 2021 23:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20fuckadmin=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=BD=9C=E6=B0=B4=E5=88=97=E8=A1=A8=E4=B8=BA=200=20?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuckadmin.py | 9 +++++++-- list.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fuckadmin.py b/fuckadmin.py index f161e15..5890e11 100644 --- a/fuckadmin.py +++ b/fuckadmin.py @@ -42,12 +42,12 @@ def mention_user(user): description='列出群组中所有潜水超过 n 天的管理员。(n>=7)。', parameters="") async def fuck_admin(context): + admins = 0 if context.is_group: pass else: await context.edit('请在群组中运行。') return - await context.edit('遍历管理员中。') # 读取天数 text = '' if len(context.parameter) == 1: @@ -72,10 +72,15 @@ async def fuck_admin(context): msg += 1 time = eval_time(context, message, day) if time: + admins += 1 text += f'{mention_user(x)} {time}\n' break if msg == 1: msg = 0 else: + admins += 1 text += f'{mention_user(x)} 从未发言\n' - await context.edit(text) + if admins > 0: + await context.edit(text) + else: + await context.edit('没有发现潜水超过 n 天的管理员呢,大家都很活跃!') diff --git a/list.json b/list.json index b9bc1e1..ad39104 100644 --- a/list.json +++ b/list.json @@ -572,7 +572,7 @@ }, { "name": "fuckadmin", - "version": "1.0", + "version": "1.01", "section": "daily", "maintainer": "xtaodada", "size": "2.7 kb",