更新Miao-Yunzai同时更新miao-plugin

This commit is contained in:
Kokomi 2023-10-26 13:14:30 +08:00
parent b4f9b54dbd
commit 8325c63a62
1 changed files with 22 additions and 15 deletions

View File

@ -44,11 +44,18 @@ export class update extends plugin {
if (/详细|详情|面板|面版/.test(this.e.msg)) return false if (/详细|详情|面板|面版/.test(this.e.msg)) return false
/** 获取插件 */ /** 获取插件 */
const plugin = this.getPlugin() let plugin = this.getPlugin()
if (plugin === false) return false if (plugin === false) return false
/** 执行更新 */ /** 执行更新 */
if (plugin === '') {
await this.runUpdate('')
await common.sleep(1000)
plugin = this.getPlugin('miao-plugin')
await this.runUpdate(plugin) await this.runUpdate(plugin)
} else {
await this.runUpdate(plugin)
}
/** 是否需要重启 */ /** 是否需要重启 */
if (this.isUp) { if (this.isUp) {