fix:补充缺少的`Bot[uin]`

This commit is contained in:
Zyy955 2023-11-03 16:35:08 +08:00
parent bd26f09f55
commit d1dbbc4a6d
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)