From cbf4900c5c3b1de65e55ce480d4b453091528e84 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 11 Apr 2021 15:03:35 +0800 Subject: =?UTF-8?q?=F0=9F=9A=80=E2=9C=A8=E2=9A=A1=EF=B8=8F=F0=9F=8E=A8?= =?UTF-8?q?=F0=9F=90=9B=20=E6=AD=A3=E5=BC=8F=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/call-owner.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'ATRI/plugins/call-owner.py') diff --git a/ATRI/plugins/call-owner.py b/ATRI/plugins/call-owner.py index 2e12a1e..488e5a3 100644 --- a/ATRI/plugins/call-owner.py +++ b/ATRI/plugins/call-owner.py @@ -6,20 +6,20 @@ from nonebot.adapters.cqhttp import ( ) from ATRI.service import Service as sv -from ATRI.rule import is_block from ATRI.config import Config from ATRI.utils.apscheduler import scheduler from ATRI.utils.list import count_list repo_list = [] +__doc__ = """ +给维护者留言 +权限组:所有人 +用法: + /来杯红茶 (msg) +""" - -repo = sv.on_command( - cmd="来杯红茶", - docs="给维护者留言", - rule=is_block() -) +repo = sv.on_command(cmd="来杯红茶", docs=__doc__) @repo.handle() async def _repo(bot: Bot, event: MessageEvent, state: T_State) -> None: @@ -54,17 +54,24 @@ async def _repo_(bot: Bot, event: MessageEvent, state: T_State) -> None: ) async def _() -> None: global repo_list - repo_list = [] + repo_list.clear() + +__doc__ = """ +重置给维护者的留言次数 +权限组:维护者 +用法: + /重置红茶 +""" reset_repo = sv.on_command( cmd="重置红茶", - docs="重置给维护者的留言次数", + docs=__doc__, permission=SUPERUSER ) @reset_repo.handle() async def _reset_repo(bot: Bot, event: MessageEvent) -> None: global repo_list - repo_list = [] + repo_list.clear() await reset_repo.finish("红茶重置完成~!") -- cgit v1.2.3