2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 11:40:51 +08:00

修改cv内容

This commit is contained in:
leiyilu 2022-06-20 09:31:42 +08:00
parent 0b2869d165
commit 74aa6c74fa

View File

@ -101,17 +101,17 @@ export async function updateMiaoPlugin(e) {
exec(command, { cwd: `${_path}/plugins/xiaoyao-cvs-plugin/` }, function (error, stdout, stderr) { exec(command, { cwd: `${_path}/plugins/xiaoyao-cvs-plugin/` }, function (error, stdout, stderr) {
//console.log(stdout); //console.log(stdout);
if (/Already up to date/.test(stdout)) { if (/Already up to date/.test(stdout)) {
e.reply("目前已经是最新版喵喵了~"); e.reply("目前已经是最新版逍遥插件了~");
return true; return true;
} }
if (error) { if (error) {
e.reply("喵喵更新失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。"); e.reply("逍遥插件更新失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
return true; return true;
} }
e.reply("喵喵更新成功尝试重新启动Yunzai以应用更新..."); e.reply("逍遥插件更新成功尝试重新启动Yunzai以应用更新...");
timer && clearTimeout(timer); timer && clearTimeout(timer);
redis.set("xiaoyao:restart-msg", JSON.stringify({ redis.set("xiaoyao:restart-msg", JSON.stringify({
msg: "重启成功,新版喵喵已经生效", msg: "重启成功,新版逍遥插件已经生效",
qq: e.user_id qq: e.user_id
}), { EX: 30 }); }), { EX: 30 });
timer = setTimeout(function () { timer = setTimeout(function () {
@ -119,7 +119,7 @@ export async function updateMiaoPlugin(e) {
exec(command, function (error, stdout, stderr) { exec(command, function (error, stdout, stderr) {
if (error) { if (error) {
if (/Yunzai not found/.test(error)) { if (/Yunzai not found/.test(error)) {
e.reply("自动重启失败,请手动重启以应用新版喵喵。请使用 npm run start 命令启动Yunzai-Bot"); e.reply("自动重启失败,请手动重启以应用新版逍遥插件。请使用 npm run start 命令启动Yunzai-Bot");
} else { } else {
e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。"); e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
} }