From 85cc112599aa8c0dc009bec70b2d57abf837135a Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Wed, 21 Aug 2024 00:22:20 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=97=A0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B0=9D=E8=AF=95=E6=B7=BB=E5=8A=A0=E8=AE=A2?= =?UTF-8?q?=E9=98=85=E6=97=B6=E8=BF=94=E5=9B=9E=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_bison/sub_manager/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nonebot_bison/sub_manager/__init__.py b/nonebot_bison/sub_manager/__init__.py index 119a0e9..ab7e10b 100644 --- a/nonebot_bison/sub_manager/__init__.py +++ b/nonebot_bison/sub_manager/__init__.py @@ -108,6 +108,16 @@ async def do_dispatch_command( asyncio.create_task(new_matcher_ins.run(bot, event, state)) +no_permission_matcher = on_command( + "无权限", rule=configurable_to_me, aliases={"添加订阅", "删除订阅", "群管理"}, priority=8, block=True +) + + +@no_permission_matcher.handle() +async def send_no_permission(): + await no_permission_matcher.finish("您没有权限进行此操作,请联系Bot所有者") + + __all__ = [ "common_platform", "add_sub_matcher",