diff --git a/website/docs/advanced/permission.md b/website/docs/advanced/permission.md index 3a73b29a..8159329a 100644 --- a/website/docs/advanced/permission.md +++ b/website/docs/advanced/permission.md @@ -45,16 +45,16 @@ async def _(): ```python from nonebot import on_command -from nonebot.adapters.onebot.v11 import GroupMessageEvent +from nonebot.adapters.onebot.v11 import Bot, GroupMessageEvent from nonebot.adapters.onebot.v11 import GROUP_ADMIN, GROUP_OWNER matcher = on_command("测试权限") @matcher.handle() -async def _(event: GroupMessageEvent): - if await GROUP_ADMIN(event): +async def _(bot: Bot, event: GroupMessageEvent): + if await GROUP_ADMIN(bot, event): await matcher.send("管理员测试成功") - elif await GROUP_OWNER(event): + elif await GROUP_OWNER(bot, event): await matcher.send("群主测试成功") else: await matcher.send("群员测试成功")