mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
修正刷新ck bug
This commit is contained in:
parent
1607968d3f
commit
c5d50a9919
@ -215,7 +215,7 @@ export async function delSign(e) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
export async function updCookie(e) {
|
export async function updCookie(e) {
|
||||||
let stoken=await gsCfg.getBingStoken();
|
let stoken=await gsCfg.getBingStoken(e.user_id);
|
||||||
if (Object.keys(stoken).length==0) {
|
if (Object.keys(stoken).length==0) {
|
||||||
e.reply("请先绑定stoken")
|
e.reply("请先绑定stoken")
|
||||||
return true;
|
return true;
|
||||||
|
@ -59,6 +59,15 @@ class GsCfg {
|
|||||||
ckQQ
|
ckQQ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async getBingStoken(userId){
|
||||||
|
try {
|
||||||
|
return YAML.parse(
|
||||||
|
fs.readFileSync(`plugins/${plugin}/data/yaml/${userId}.yaml`, 'utf8')
|
||||||
|
)
|
||||||
|
}catch (ex) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 读取所有用户绑定的stoken */
|
/** 读取所有用户绑定的stoken */
|
||||||
async getBingStoken() {
|
async getBingStoken() {
|
||||||
let ck = []
|
let ck = []
|
||||||
|
Loading…
Reference in New Issue
Block a user