From 1d6b99c68edc5af0a3a84643298604f424323256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Sun, 26 Mar 2023 22:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20segment=20=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/apitext.js | 1 - apps/comic.js | 1 - apps/mcchuochuo.js | 1 - apps/mh.js | 1 - apps/set.js | 1 - apps/st.js | 1 - apps/stplus.js | 1 - apps/threephoto.js | 1 - apps/up to V2.js | 1 - apps/ysmh.js | 1 - apps/yxysj.js | 1 - ...01\257\351\243\216\346\216\247\345\244\204\347\220\206.js" | 2 -- index.js | 4 ++++ 13 files changed, 4 insertions(+), 13 deletions(-) diff --git a/apps/apitext.js b/apps/apitext.js index 789a410..6a402b7 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 26ba8cd..0dc8cdf 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 24eef41..708251c 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 59cd547..2b8a1f6 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 5cd0689..1463140 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 4c4ca0d..04a8942 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 98a373f..021c653 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 69a18fe..2fb1d71 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 9bd8a6d..517700c 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 23923fe..dbaba91 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 9637454..79d3f86 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 4673003..757338b 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 08dc9c0..bc1464a 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 = [] -- Gitee