typo: 代码注释

This commit is contained in:
bietiaop 2024-07-15 14:25:42 +08:00
parent 51b3908afd
commit 4c90ca5354
12 changed files with 457 additions and 139 deletions

View file

@ -3,12 +3,18 @@ import { getStoken } from './authkey.js';
export const rulePrefix = '^((#|\\%)?(zzz|ZZZ|绝区零))';
export async function getCk(e, s = false) {
/**
* 获取米游社用户的 cookie
* @param {Object} e yunzai事件
* @param {boolean} s 是否获取 stoken
* @returns {Promise<Object>}
*/
export const getCk = async (e, s = false) => {
e.isSr = true;
let stoken = '';
let user = new User(e);
const user = new User(e);
if (s) {
stoken = await getStoken(e);
stoken = getStoken(e);
}
if (typeof user.getCk === 'function') {
let ck = user.getCk();
@ -19,7 +25,7 @@ export async function getCk(e, s = false) {
});
return ck;
}
let mysUser = (await user.user()).getMysUser('zzz');
const mysUser = (await user.user()).getMysUser('zzz');
let ck;
if (mysUser) {
ck = {
@ -33,4 +39,4 @@ export async function getCk(e, s = false) {
};
}
return ck;
}
};