细节优化
This commit is contained in:
parent
0ff25b7552
commit
7cae3f0531
4
app.js
4
app.js
|
@ -1,3 +1,3 @@
|
|||
import Yunzai from './lib/bot.js'
|
||||
global.Bot = new Yunzai()
|
||||
import Yunzai from "./lib/bot.js"
|
||||
global.Bot = new Yunzai
|
||||
Bot.run()
|
|
@ -32,7 +32,7 @@
|
|||
"node-xlsx": "^0.23.0",
|
||||
"oicq": "link:lib/modules/oicq",
|
||||
"pm2": "^5.3.0",
|
||||
"puppeteer": "^20.9.0",
|
||||
"puppeteer": "^21.0.1",
|
||||
"redis": "^4.6.7",
|
||||
"sequelize": "^6.32.1",
|
||||
"sqlite3": "^5.1.6",
|
||||
|
@ -40,9 +40,9 @@
|
|||
"yaml": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.45.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-import": "^2.28.0",
|
||||
"eslint-plugin-n": "^16.0.1",
|
||||
"eslint-plugin-promise": "^6.1.1"
|
||||
},
|
||||
|
|
|
@ -329,7 +329,7 @@ Bot.adapter.push(new class ComWeChatAdapter {
|
|||
Bot[data.self_id].getFriendMap()
|
||||
Bot[data.self_id].getGroupMap()
|
||||
|
||||
logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) 已连接`)
|
||||
logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) ${Bot[data.self_id].version.impl}-${Bot[data.self_id].version.version} 已连接`)
|
||||
Bot.emit(`connect.${data.self_id}`, Bot[data.self_id])
|
||||
Bot.emit("connect", Bot[data.self_id])
|
||||
}
|
||||
|
|
|
@ -607,9 +607,8 @@ Bot.adapter.push(new class gocqhttpAdapter {
|
|||
Bot[data.self_id].info = (await data.sendApi("get_login_info")).data
|
||||
Bot[data.self_id].guild_info = (await data.sendApi("get_guild_service_profile")).data
|
||||
Bot[data.self_id].clients = (await data.sendApi("get_online_clients")).clients
|
||||
Bot[data.self_id].version = (await data.sendApi("get_version_info")).data
|
||||
Bot[data.self_id].version = {
|
||||
...Bot[data.self_id].version,
|
||||
...(await data.sendApi("get_version_info")).data,
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
}
|
||||
|
@ -617,7 +616,7 @@ Bot.adapter.push(new class gocqhttpAdapter {
|
|||
Bot[data.self_id].getFriendMap()
|
||||
Bot[data.self_id].getGroupMap()
|
||||
|
||||
logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) 已连接`)
|
||||
logger.mark(`${logger.blue(`[${data.self_id}]`)} ${this.name}(${this.id}) ${Bot[data.self_id].version.app_full_name} 已连接`)
|
||||
Bot.emit(`connect.${data.self_id}`, Bot[data.self_id])
|
||||
Bot.emit("connect", Bot[data.self_id])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue