fix: 恢复segment全局变量
This commit is contained in:
parent
730a108b41
commit
c016648ad7
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
> 必要环境 Node.js>16.14.0 + Redis>5.0.0
|
> 必要环境 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/)
|
[!点击阅读Miao-Yunzai文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/)
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ cd Miao-Yunzai
|
||||||
- 安装插件(计划移除中...)
|
- 安装插件(计划移除中...)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
||||||
git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
|
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
|
npm run login
|
||||||
```
|
```
|
||||||
|
|
||||||
- 进程托管
|
- 托管
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run start
|
npm run start
|
||||||
|
|
18
src/bot.ts
18
src/bot.ts
|
@ -5,25 +5,27 @@
|
||||||
*/
|
*/
|
||||||
import './config/init.js'
|
import './config/init.js'
|
||||||
/**
|
/**
|
||||||
|
* **********
|
||||||
|
* 全局变量配置
|
||||||
|
* *********
|
||||||
|
*/
|
||||||
|
import './global.js'
|
||||||
|
/**
|
||||||
|
* **********
|
||||||
* 配置读取工具
|
* 配置读取工具
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
import cfg from './config/config.js'
|
import cfg from './config/config.js'
|
||||||
/**
|
/**
|
||||||
|
* **********
|
||||||
* 监听
|
* 监听
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
import ListenerLoader from './core/events.loader.js'
|
import ListenerLoader from './core/events.loader.js'
|
||||||
/**
|
/**
|
||||||
* 扩展
|
* 扩展
|
||||||
*/
|
*/
|
||||||
import { Client } from 'icqq'
|
import { Client } from 'icqq'
|
||||||
|
|
||||||
import { plugin } from './core/plugins/index.js'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* global
|
|
||||||
*/
|
|
||||||
global.plugin = plugin
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { segment } from 'icqq'
|
||||||
|
import { plugin } from './core/plugins/index.js'
|
||||||
|
/**
|
||||||
|
* global
|
||||||
|
*/
|
||||||
|
global.plugin = plugin
|
||||||
|
global.segment = segment
|
Loading…
Reference in New Issue