diff --git a/apps/neteasepro.js b/apps/neteasepro.js index 5779e0a..a77eeca 100644 --- a/apps/neteasepro.js +++ b/apps/neteasepro.js @@ -1,7 +1,6 @@ import plugin from "../../../lib/plugins/plugin.js"; import axios from "axios"; import fs from "node:fs"; -import { segment } from "oicq"; import { checkMusic, getCookies, diff --git a/apps/query.js b/apps/query.js index ed381e4..9b34a59 100644 --- a/apps/query.js +++ b/apps/query.js @@ -1,5 +1,4 @@ // 主库 -import { segment } from "oicq"; import fetch from "node-fetch"; // 爬虫库 import puppeteer from "../../../lib/puppeteer/puppeteer.js"; diff --git a/apps/tools.js b/apps/tools.js index 2721939..d7fd1fd 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1,7 +1,6 @@ // 主库 import fetch from "node-fetch"; import fs from "node:fs"; -import { segment } from "oicq"; // 其他库 import axios from "axios"; import _ from "lodash"; diff --git a/index.js b/index.js index 7270e05..39fb56c 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,8 @@ import fs from "node:fs"; import RConfig from "./model/index.js"; +if (!global.segment) { + global.segment = (await import("oicq")).segment +} const versionData = RConfig.getConfig("version");