Merge pull request #303 from Zyy955/master

fix:补充缺少的`Bot[uin]`
This commit is contained in:
Ca(HCO₃)₂ 2023-11-03 16:39:35 +08:00 committed by GitHub
commit c503f353c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

2
app.js
View File

@ -3,7 +3,7 @@ import Yunzai from './lib/bot.js'
/** 全局变量 bot */
global.Bot = await Yunzai.run()
if (Bot.uin == "88888") {
if (Bot.uin == 88888) {
/** 跳过登录后加载插件... */
await ((await import('./lib/plugins/loader.js')).default).load()
}

View File

@ -17,7 +17,8 @@ export default class Yunzai extends Client {
if (cfg.bot.skip_login) {
/** 造个假~! */
bot.uin = "88888"
bot.uin = 88888
bot[bot.uin] = bot
return bot
} else {
await bot.login(cfg.qq, cfg.pwd)