nonebot-plugin-access-control for OneBot V12

September 25, 2023 · View on GitHub

主体定义(单级群组)

从上往下优先级从高到低

主体TAG含义示例存在条件
<platform>:g<group_id>:<user_id>platform:group:user来自<platform>的群用户qq:g87654321:12345678仅当消息来自群组时存在
onebot:g<group_id>:<user_id>onebot:group:user来自OneBot的群用户onebot:g87654321:12345678仅当消息来自群组时存在
<platform>:<user_id>platform:user来自<platform>的用户qq:12345678
onebot:<user_id>onebot:user来自OneBot的用户onebot:12345678
superusersuperuser超级用户仅当该用户为超级用户时存在
<platform>:g<group_id>platform:group来自<platform>的群组qq:g87654321仅当消息来自群组/频道时存在
onebot:g<group_id>onebot:group来自OneBot的群组onebot:g87654321仅当消息来自群组/频道时存在
<platform>:privateplatform:chat_type来自<platform>的私聊消息qq:private仅当消息来自私聊时存在
onebot:privateonebot:chat_type来自OneBot的私聊消息仅当消息来自私聊时存在
privatechat_type私聊消息仅当消息来自私聊时存在
<platform>:groupplatform:chat_type来自<platform>的群聊消息qq:group仅当消息来自群聊时存在
onebot:grouponebot:chat_type来自OneBot的私聊消息仅当消息来自群聊时存在
groupchat_type私聊消息仅当消息来自私聊时存在
<platform>platform来自<platform>的用户qq
onebotonebot来自OneBot的用户
allall所有用户

主体定义(两级群组)

从上往下优先级从高到低

主体TAG含义示例存在条件
<platform>:g<guild_id>:c<channel_id>:<user_id>platform:guild:channel:user来自<platform>的服务器频道用户telegram:g87654321:c123454321:12345678仅当消息来自频道时存在
onebot:g<guild_id>:c<channel_id>:<user_id>onebot:guild:channel:user来自OneBot的服务器频道用户onebot:g87654321:c123454321:12345678仅当消息来自频道时存在
<platform>:c<channel_id>:<user_id>platform:channel:user来自<platform>的频道用户telegram:c123454321:12345678仅当消息来自频道时存在
onebot:c<channel_id>:<user_id>onebot:channel:user来自OneBot的频道用户onebot:c123454321:12345678仅当消息来自频道时存在
<platform>:g<guild_id>:<user_id>platform:guild:user来自<platform>的服务器用户telegram:g87654321:12345678仅当消息来自服务器时存在
onebot:g<guild_id>:<user_id>onebot:guild:user来自OneBot的服务器用户onebot:g87654321:12345678仅当消息来自服务器时存在
<platform>:<user_id>platform:user来自<platform>的用户telegram:12345678
onebot:<user_id>onebot:user来自OneBot的用户onebot:12345678
superusersuperuser超级用户仅当该用户为超级用户时存在
<platform>:g<guild_id>:c<channel_id>platform:guild:channel来自<platform>的服务器频道telegram:g87654321:c123454321仅当消息来自频道时存在
onebot:g<guild_id>:c<channel_id>onebot:guild:channel来自OneBot的服务器频道onebot:g87654321:c123454321仅当消息来自频道时存在
<platform>:c<channel_id>platform:channel来自<platform>的频道telegram:c123454321仅当消息来自频道时存在
onebot:c<channel_id>onebot:channel来自OneBot的频道onebot:c123454321仅当消息来自频道时存在
<platform>:g<guild_id>platform:guild来自<platform>的服务器telegram:g87654321仅当消息来自频道时存在
onebot:g<guild_id>onebot:guild来自OneBot的服务器onebot:g87654321仅当消息来自频道时存在
<platform>:privateplatform:private来自<platform>的私聊消息qq:private仅当消息来自私聊时存在
onebot:privateonebot:private来自OneBot的私聊消息仅当消息来自私聊时存在
privateprivate私聊消息仅当消息来自私聊时存在
<platform>:channelplatform:channel来自<platform>的频道消息telegram:channel仅当消息来自频道时存在
onebot:channelonebot:channel来自OneBot的频道消息仅当消息来自频道时存在
channelchannel频道消息
<platform>platform来自<platform>的用户qq
onebotonebot来自OneBot的用户
allall所有用户