mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-14 00:20:06 +08:00
Config提供type字段确定配置项类型
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
import nonebot
|
||||
|
||||
from configs.config import Config
|
||||
from utils.utils import GDict
|
||||
import nonebot
|
||||
|
||||
Config.add_plugin_config(
|
||||
"word_bank",
|
||||
@@ -8,9 +11,10 @@ Config.add_plugin_config(
|
||||
5,
|
||||
name="词库问答",
|
||||
help_="设置增删词库的权限等级",
|
||||
default_value=5
|
||||
default_value=5,
|
||||
type=int,
|
||||
)
|
||||
|
||||
GDict['run_sql'].append("ALTER TABLE word_bank2 ADD to_me VARCHAR(255);")
|
||||
GDict["run_sql"].append("ALTER TABLE word_bank2 ADD to_me VARCHAR(255);")
|
||||
|
||||
nonebot.load_plugins("plugins/word_bank")
|
||||
nonebot.load_plugins(str(Path(__file__).parent.resolve()))
|
||||
|
||||
Reference in New Issue
Block a user