diff --git a/apps/apitext.js b/apps/apitext.js index 789a410e71bd4db8e4d220bf19cd25e9c9b1db0b..6a402b719067a4d4818f440f0fb2fcf1a26bd9bb 100644 --- a/apps/apitext.js +++ b/apps/apitext.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/comic.js b/apps/comic.js index 26ba8cd9b3937fe9668e3a5ebae9df10d304f9c9..0dc8cdfdca9113408f79b2c1982f88fc77db8096 100644 --- a/apps/comic.js +++ b/apps/comic.js @@ -1,5 +1,4 @@ //插件:B站404随机漫画 -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/mcchuochuo.js b/apps/mcchuochuo.js index 24eef41703bce25195a327ee56d2f038e62717f7..708251cdea05c846ad5999d9c9894a4adcee6d42 100644 --- a/apps/mcchuochuo.js +++ b/apps/mcchuochuo.js @@ -1,5 +1,4 @@ //mc酱戳一戳(记得关喵喵戳一戳) -import { segment } from "oicq"; import fetch from "node-fetch"; import cfg from'../../../lib/config/config.js' import plugin from '../../../lib/plugins/plugin.js'; diff --git a/apps/mh.js b/apps/mh.js index 59cd547b0dab1a73824a2b02658dfebcf8fc4d5e..2b8a1f6c0023fff1d6be7ccffdb0a727aecb3967 100644 --- a/apps/mh.js +++ b/apps/mh.js @@ -1,5 +1,4 @@ //插件:盲盒 -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/set.js b/apps/set.js index 5cd0689c9c1d1dbed3cf2dfe694afb9e2b89b5ba..1463140582b090485b8daa20106b435fe6402c28 100644 --- a/apps/set.js +++ b/apps/set.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/st.js b/apps/st.js index 4c4ca0dae0e57a5bc3703cbbf4815a09d0525067..04a89421e0077cceb39be824c82ab6cc0e61de44 100644 --- a/apps/st.js +++ b/apps/st.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/stplus.js b/apps/stplus.js index 98a373ffc78a634822a96e509f81600932ac9a4a..021c653c56be5357db7a94242b6bacd9c841f0e6 100644 --- a/apps/stplus.js +++ b/apps/stplus.js @@ -1,5 +1,4 @@ //插件setuplus(铯图) -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import co from '../../../lib/common/common.js' diff --git a/apps/threephoto.js b/apps/threephoto.js index 69a18fe97e4075c6b5bc406deccb009477b182ea..2fb1d71575331a51d4b3a567fc2451b68f0e379b 100644 --- a/apps/threephoto.js +++ b/apps/threephoto.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/up to V2.js b/apps/up to V2.js index 9bd8a6d87eb981304738fefaa898bc67059c1ec0..517700c8000873f288d0000c397d54524a28abce 100644 --- a/apps/up to V2.js +++ b/apps/up to V2.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import { createRequire } from 'module' import common from'../../../lib/common/common.js' diff --git a/apps/ysmh.js b/apps/ysmh.js index 23923feb559510106cc7c88b1283f7659745d962..dbaba916b5e919d9117742f6367405b6905615f2 100644 --- a/apps/ysmh.js +++ b/apps/ysmh.js @@ -1,5 +1,4 @@ //插件:原神盲盒 -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git a/apps/yxysj.js b/apps/yxysj.js index 9637454a2184873a76e0a11a8523dbec1b666e0b..79d3f8642f1b8a3df885df0b45f65ad4f1a1fcdb 100644 --- a/apps/yxysj.js +++ b/apps/yxysj.js @@ -1,4 +1,3 @@ -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import common from'../../../lib/common/common.js' diff --git "a/apps/\346\266\210\346\201\257\351\243\216\346\216\247\345\244\204\347\220\206.js" "b/apps/\346\266\210\346\201\257\351\243\216\346\216\247\345\244\204\347\220\206.js" index 4673003fdaf21ca4e394ab3c4adb90f0d04fa489..757338b35dbe31581fd3aa0cd669aaed3fbf3e1e 100644 --- "a/apps/\346\266\210\346\201\257\351\243\216\346\216\247\345\244\204\347\220\206.js" +++ "b/apps/\346\266\210\346\201\257\351\243\216\346\216\247\345\244\204\347\220\206.js" @@ -1,5 +1,4 @@ //此js插件来源小飞插件,已获得原作者许可 -import { segment } from "oicq"; import fetch from "node-fetch"; import plugin from '../../../lib/plugins/plugin.js'; import fs from 'fs' @@ -9,7 +8,6 @@ export class xiaofei extends plugin { super({ name: '消息风控处理-小飞', dsc: '检测到消息发送失败时,自动使用特殊处理的转发消息再次发送', - /** https://oicqjs.github.io/oicq/#events */ event: 'message', priority: 2, }); diff --git a/index.js b/index.js index 08dc9c0f9f24faf741d70639231e2ed3a0d2648d..bc1464a3cccf724191d6bfac6cf06ca352fb1573 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,9 @@ import fs from 'node:fs' +if (!global.segment) { + global.segment = (await import("oicq")).segment +} + const files = fs.readdirSync('./plugins/yunzai-c-v-plugin/apps').filter(file => file.endsWith('.js')) let ret = []