Skip to main content

基于权限节点/权限组/特殊权限的Nonebot权限管理插件。

Project description

plugin-liteperm

基于权限节点+特殊权限+权限组的依赖权限管理插件!

本项目灵感来自于LuckPerms

NoneBot Plugin LitePerms 文档

📖 指令文档

通用命令结构

/lp [对象类型] [操作类型] [操作] [目标] [值]

用户权限管理 (lp user)

/lp user [用户ID] [操作类型] [操作] [目标节点/组] [值]

操作类型

  1. permission - 直接权限管理

    • set [节点] [true/false]:设置权限节点状态
    • del [节点]:删除权限节点
    • check [节点]:检查权限节点
    • list:列出所有权限
  2. parent - 继承组管理

    • add [组名]:添加继承组
    • del [组名]:移除继承组
    • set [组名]:覆盖为指定组的权限
  3. perm_group - 权限组管理

    • add [组名]:添加权限组
    • del [组名]:移除权限组

示例

/lp user 123456 permission set lp.admin true
/lp user 123456 parent add admin_group

群组权限管理 (lp group)

/lp group [群号] [操作类型] [操作] [目标节点/组] [值]

(参数格式与用户权限管理相同)


权限组管理 (lp perm_group)

/lp perm_group [组名] [操作类型] [操作] [目标节点/组] [值]

新增操作类型

  • to - 组操作
    • create:创建新权限组
    • remove:删除权限组

示例

/lp perm_group admin to create
/lp perm_group admin permission set system.* true

命令权限管理 (lp command)

/lp command [命令名] [操作类型] [操作] [权限节点] [值]

操作类型

  • set_permission:设置命令权限节点
  • command del:删除命令权限配置

示例

/lp command ping set_permission lp.user.ping true

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_liteperm-0.0.1.dev2.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_liteperm-0.0.1.dev2-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_liteperm-0.0.1.dev2.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_liteperm-0.0.1.dev2.tar.gz
Algorithm Hash digest
SHA256 b484d90990123a31a97122a1c12a1a1a5ebe19052e5a592c737ecce59cd1b05f
MD5 4e687e08e2f177fb32e761583f09a5a8
BLAKE2b-256 8d277b3d4b122afcd7907ad4aa194f1d3aef60d0ccf160c4fed997629dd5fdc7

See more details on using hashes here.

File details

Details for the file nonebot_plugin_liteperm-0.0.1.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_liteperm-0.0.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad58bc5b6f193812bafee970e97d980cb0dc78dd38e8f2f665096030e53b0937
MD5 6b0e4cd97f9a1f01b4abf2053757e0f9
BLAKE2b-256 c692ec654ff35724c74f65134ab723d611981550e046611f9234998422463de0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page