https://github.com/karlatemp/mirai-kc
Mirai-Karlatemp's Console, 自用 Console 框架
https://github.com/karlatemp/mirai-kc
mirai mirai-console qqbot
Last synced: about 2 months ago
JSON representation
Mirai-Karlatemp's Console, 自用 Console 框架
- Host: GitHub
- URL: https://github.com/karlatemp/mirai-kc
- Owner: Karlatemp
- License: agpl-3.0
- Created: 2020-06-17T13:28:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T09:53:10.000Z (over 5 years ago)
- Last Synced: 2025-06-26T12:51:55.113Z (4 months ago)
- Topics: mirai, mirai-console, qqbot
- Language: Kotlin
- Homepage:
- Size: 8.89 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mirai-KC
## 准备构建
运行 `gradlew jar` 获取IDEA编译用依赖库
运行 `gradlew shadowjar` 获取完整构建, 但是此jar无法用于jar依赖
### 运行
#### 在 IDEA 运行
首先我们准备一个scope
```kotlin
val scope = CoroutineScope(CoroutineThreadPool)
scope.subscribeAlways {
}
```
是的,和Mirai-demo基本一致当我们的工作都准备完成后, 执行下面的这一句
```kotlin
io.github.karlatemp.miraikc.bootstrap.Main.main(arrayOf())
```
现在我们的入口看起来是这样的
```kotlin
fun main() {
val scope = CoroutineScope(CoroutineThreadPool)
scope.subscribeAlways {
}io.github.karlatemp.miraikc.bootstrap.Main.main(arrayOf())
}
```如果出现了错误, 你还可以在 `fun main(){}` 开头加上一句
`System.setProeprty("mirai.idea", "")`#### 在插件模式运行
首先编写一个插件, 见 `MoRain`
创建一个文件夹, 叫做 `plugins`
我们将插件构建放在这个文件夹里面. 然后打开我们的终端
- For Windows
```shell script
java -cp "mirai-android-XXX.jar;Mirai-KC-XXXX.shadow.jar" io.github.karlatemp.miraikc.bootstrap.Main
```- For Linux
```shell script
java -cp mirai-android-XXX.jar:Mirai-KC-XXXX.shadow.jar io.github.karlatemp.miraikc.bootstrap.Main
```