2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

修复V2启动报错

This commit is contained in:
ctrlcvs 2022-09-17 14:01:16 +08:00
parent 249e73999a
commit b97309b39a

View File

@ -16,7 +16,6 @@ import {
import moment from 'moment';
import MysApi from "../model/mys/mysApi.js";
import utils from "../model/mys/utils.js";
import {getRender} from "../adapter/render.js"
const _path = process.cwd();
let role_user = Data.readJSON(`${_path}/plugins/xiaoyao-cvs-plugin/resources/dailyNote/json/`, "dispatch_time");
@ -354,6 +353,7 @@ export async function DailyNoteTask() {
EX: sendCD
});
if(isV3){
let {getRender} = await import(`file://${_path}/plugins/xiaoyao-cvs-plugin/render.js`);
await Note(e, {render:await getRender()});
}else{
let {getPluginRender} = await import(`file://${_path}/lib/render.js`);
@ -368,7 +368,6 @@ export async function pokeNote(e,{render}) {
if (!Cfg.get("note.poke")) {
return false;
}
// return await Note(e,{render:await getRender()}, "poke");
return await Note(e,{render}, "poke");
}