Closed HsiangNianian closed 1 year ago
适应配置需要,考虑在插件编写时使用from OlivOS.JyunkoUserConf import *加入用户配置项机制。第一次使用将会在./plugin/data/文件夹下生成UserConf.dat配置文件。
from OlivOS.JyunkoUserConf import *
./plugin/data/
UserConf.dat
import pickle import os.path
setUserConf(plugin_event.data.user_id,"jrrp",0)
jrrp
0
None
getUserConf(plugin_event.data.user_id,"jrrp",0)
setGroupConf(plugin_event.data.group_id,"许可",False)
许可
False
getGroupConf(plugin_event.data.group_id,"许可",False)
配置项
依赖
API
setUserConf(plugin_event.data.user_id,"jrrp",0)
jrrp
配置值为0
None
getUserConf(plugin_event.data.user_id,"jrrp",0)
jrrp
配置值setGroupConf(plugin_event.data.group_id,"许可",False)
许可
配置值为False
None
getGroupConf(plugin_event.data.group_id,"许可",False)
许可
配置值