mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-10 18:57:56 +08:00
增加了group_manage_matcher的重载
This commit is contained in:
@@ -12,7 +12,7 @@ from nonebot.internal.params import ArgStr
|
||||
from nonebot.internal.rule import Rule
|
||||
from nonebot.log import logger
|
||||
from nonebot.matcher import Matcher
|
||||
from nonebot.params import Depends, EventMessage, EventPlainText, EventToMe
|
||||
from nonebot.params import Depends, EventMessage, EventPlainText, EventToMe, EventType
|
||||
from nonebot.permission import SUPERUSER
|
||||
from nonebot.rule import to_me
|
||||
from nonebot.typing import T_State
|
||||
@@ -319,6 +319,9 @@ do_del_sub(del_sub_matcher)
|
||||
|
||||
group_manage_matcher = on_command("群管理",rule=to_me(),permission=SUPERUSER,priority=4)
|
||||
|
||||
@group_manage_matcher.handle()
|
||||
async def send_group_list(bot: Bot, event: GroupMessageEvent, state: T_State):
|
||||
await group_manage_matcher.finish(Message("该功能只支持私聊使用,请私聊Bot"))
|
||||
|
||||
@group_manage_matcher.handle()
|
||||
async def send_group_list(bot: Bot, event: PrivateMessageEvent, state: T_State):
|
||||
|
||||
Reference in New Issue
Block a user