mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-06 20:06:12 +08:00
fix conflict
This commit is contained in:
commit
5743dbc1d9
@ -294,12 +294,14 @@ del_sub_matcher = on_command(
|
|||||||
del_sub_matcher.handle()(set_target_user_info)
|
del_sub_matcher.handle()(set_target_user_info)
|
||||||
do_del_sub(del_sub_matcher)
|
do_del_sub(del_sub_matcher)
|
||||||
|
|
||||||
group_manage_matcher = on_command("群管理",rule=to_me(),permission=SUPERUSER,priority=4)
|
group_manage_matcher = on_command("群管理", rule=to_me(), permission=SUPERUSER, priority=4)
|
||||||
|
|
||||||
|
|
||||||
@group_manage_matcher.handle()
|
@group_manage_matcher.handle()
|
||||||
async def send_group_list(bot: Bot, event: GroupMessageEvent, state: T_State):
|
async def send_group_list(bot: Bot, event: GroupMessageEvent, state: T_State):
|
||||||
await group_manage_matcher.finish(Message("该功能只支持私聊使用,请私聊Bot"))
|
await group_manage_matcher.finish(Message("该功能只支持私聊使用,请私聊Bot"))
|
||||||
|
|
||||||
|
|
||||||
@group_manage_matcher.handle()
|
@group_manage_matcher.handle()
|
||||||
async def send_group_list(bot: Bot, event: PrivateMessageEvent, state: T_State):
|
async def send_group_list(bot: Bot, event: PrivateMessageEvent, state: T_State):
|
||||||
groups = await bot.call_api("get_group_list")
|
groups = await bot.call_api("get_group_list")
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
|
import pytest
|
||||||
from nonebug import App
|
from nonebug import App
|
||||||
|
|
||||||
from .utils import fake_admin_user, fake_private_message_event, fake_group_message_event, fake_superuser
|
from .utils import (
|
||||||
|
fake_admin_user,
|
||||||
|
fake_group_message_event,
|
||||||
|
fake_private_message_event,
|
||||||
|
fake_superuser,
|
||||||
|
)
|
||||||
|
|
||||||
from .conftest import app
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_query_with_superuser_private(app: App):
|
async def test_query_with_superuser_private(app: App):
|
||||||
@ -51,6 +53,7 @@ async def test_query_with_superuser_private(app: App):
|
|||||||
ctx.should_pass_rule()
|
ctx.should_pass_rule()
|
||||||
ctx.should_pass_permission()
|
ctx.should_pass_permission()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_query_with_superuser_group_tome(app: App):
|
async def test_query_with_superuser_group_tome(app: App):
|
||||||
from nonebot.adapters.onebot.v11.bot import Bot
|
from nonebot.adapters.onebot.v11.bot import Bot
|
||||||
@ -67,4 +70,4 @@ async def test_query_with_superuser_group_tome(app: App):
|
|||||||
ctx.should_pass_permission()
|
ctx.should_pass_permission()
|
||||||
ctx.should_call_send(
|
ctx.should_call_send(
|
||||||
event, Message("该功能只支持私聊使用,请私聊Bot"), True
|
event, Message("该功能只支持私聊使用,请私聊Bot"), True
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user