diff --git a/README.md b/README.md index 8332751..d0c7703 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ > 必要环境 Node.js>16.14.0 + Redis>5.0.0 -> 推荐环境 Node.js=18.18.2 + Redis>6.0.0 +> 推荐环境 Node.js@18.18.2 + Rediss@6.0.0 [!点击阅读Miao-Yunzai文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/) @@ -27,7 +27,6 @@ cd Miao-Yunzai - 安装插件(计划移除中...) ```sh - git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/ ``` @@ -50,7 +49,7 @@ npm run app npm run login ``` -- 进程托管 +- 托管 ```sh npm run start diff --git a/src/bot.ts b/src/bot.ts index f99eb35..d1403ab 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -5,25 +5,27 @@ */ import './config/init.js' /** + * ********** + * 全局变量配置 + * ********* + */ +import './global.js' +/** + * ********** * 配置读取工具 + * ********** */ import cfg from './config/config.js' /** + * ********** * 监听 + * ********** */ import ListenerLoader from './core/events.loader.js' /** * 扩展 */ import { Client } from 'icqq' - -import { plugin } from './core/plugins/index.js' - -/** - * global - */ -global.plugin = plugin - /** * */ diff --git a/src/global.ts b/src/global.ts new file mode 100644 index 0000000..cafcd4f --- /dev/null +++ b/src/global.ts @@ -0,0 +1,7 @@ +import { segment } from 'icqq' +import { plugin } from './core/plugins/index.js' +/** + * global + */ +global.plugin = plugin +global.segment = segment