mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
typo: 代码注释
This commit is contained in:
parent
51b3908afd
commit
4c90ca5354
12 changed files with 457 additions and 139 deletions
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue