Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nonebot_plugin_liteperm"
version = "0.0.1"
version = "0.0.1.post1"
description = "基于权限节点/权限组/特殊权限的Nonebot权限管理插件。"
authors = [
{ name = "JohnRichard4096", email = "windowserror@163.com" },
Expand Down
7 changes: 5 additions & 2 deletions src/nonebot_plugin_liteperm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tomli
import tomli_w
from nonebot_plugin_localstore import get_plugin_config_dir, get_plugin_data_dir
from pydantic import BaseModel
from pydantic import BaseModel, Field

plugin_data_dir = get_plugin_data_dir()
config_dir = get_plugin_config_dir()
Expand Down Expand Up @@ -45,7 +45,10 @@ class CommandConfig(BasicDataModel):


class Config(BasicDataModel):
cmd_permission_checker: bool = True
cmd_permission_checker: bool = Field(
default=True,
description="是否开启命令权限检查",
)

def save_to_toml(self, path: Path):
"""保存配置到 TOML 文件"""
Expand Down