喵喵更新自动重启适配node app的启动方式

This commit is contained in:
Sirly 2022-06-16 04:44:32 +00:00 committed by GitHub
parent 802125727c
commit fe9092bcf7

View File

@ -186,11 +186,9 @@ export async function updateMiaoPlugin(e) {
}
exec(command, function (error, stdout, stderr) {
if (error) {
if (/Yunzai not found/.test(error)) {
e.reply("自动重启失败,请手动重启以应用新版喵喵。请使用 npm run start 命令启动Yunzai-Bot");
} else {
e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
}
redis.del('miao:restart-msg');
e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
Bot.logger.error('重启失败\n${error.stack}');
return true;
}
})