feat: webui-test-0

This commit is contained in:
手瓜一十雪
2024-05-05 14:32:48 +08:00
parent c4cf800142
commit 31c330826e
5 changed files with 228 additions and 14 deletions

View File

@@ -8,15 +8,16 @@ import { checkVersion } from '@/common/utils/version';
import { log, logDebug, logError, LogLevel, setLogLevel } from '@/common/utils/log';
import { NapCatOnebot11 } from '@/onebot11/main';
import { hookApi } from '@/core/external/hook';
import { InitWebUi } from './webui/index';
program
.option('-q, --qq <type>', 'QQ号')
.parse(process.argv);
InitWebUi();
const cmdOptions = program.opts();
// console.log(process.argv);
for(let k=0; k<30; k++) {
for (let k = 0; k < 30; k++) {
new Promise((r, j) => {
hookApi.getRKey();
}).then();
@@ -61,8 +62,8 @@ const quickLoginQQ = cmdOptions.qq;
// });
if (quickLoginQQ) {
log('正在快速登录 ', quickLoginQQ);
napCatCore.quickLogin(quickLoginQQ).then(res=>{
if (res.loginErrorInfo.errMsg){
napCatCore.quickLogin(quickLoginQQ).then(res => {
if (res.loginErrorInfo.errMsg) {
logError('快速登录错误:', res.loginErrorInfo.errMsg);
}
}).catch((e) => {