细节优化

This commit is contained in:
🌌 2023-10-13 19:17:00 +08:00
parent 4604a5985f
commit d10c81972c
3 changed files with 6 additions and 9 deletions

View File

@ -151,9 +151,6 @@ Bot.adapter.push(new class stdinAdapter {
}
Bot[this.id].gml.set(this.id, Bot[this.id].fl)
if (!Bot.uin.includes(this.id))
Bot.uin.push(this.id)
process[this.id].on("data", data => this.message(data.toString()))
logger.mark(`${logger.blue(`[${this.id}]`)} ${this.name}(${this.id}) 已连接`)

View File

@ -32,7 +32,7 @@
"node-xlsx": "^0.23.0",
"oicq": "link:lib/modules/oicq",
"pm2": "^5.3.0",
"puppeteer": "^21.3.6",
"puppeteer": "^21.3.8",
"redis": "^4.6.10",
"sequelize": "^6.33.0",
"sqlite3": "^5.1.6",
@ -40,10 +40,10 @@
"yaml": "^2.3.2"
},
"devDependencies": {
"eslint": "^8.50.0",
"eslint": "^8.51.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^16.1.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-promise": "^6.1.1"
},
"imports": {

View File

@ -19,11 +19,11 @@ export class update extends plugin {
priority: 4000,
rule: [
{
reg: '^#更新日志',
reg: '^#更新日志$',
fnc: 'updateLog'
},
{
reg: '^#(强制)?更新',
reg: '^#(强制)?更新$',
fnc: 'update'
},
{
@ -223,7 +223,7 @@ export class update extends plugin {
cm = 'git config -l'
if (plugin) cm = `cd "plugins/${plugin}" && ${cm}`
end = await execSync(cm, { encoding: 'utf-8' })
end = end.match(/remote\..*\.url=.+/g).join('\n\n').replace(/remote\..*\.url=/g, '')
end = end.match(/remote\..*\.url=.+/g).join('\n\n').replace(/remote\..*\.url=/g, '').replace(/\/\/([^@]+)@/, '//')
} catch (error) {
logger.error(error.toString())
await this.reply(error.toString())