Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mzdluo123/mirai-spring-boot-starter
https://github.com/mzdluo123/mirai-spring-boot-starter
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mzdluo123/mirai-spring-boot-starter
- Owner: mzdluo123
- Created: 2021-02-20T06:25:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T05:42:40.000Z (almost 3 years ago)
- Last Synced: 2024-08-03T14:05:22.214Z (4 months ago)
- Language: Kotlin
- Size: 88.9 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-mirai - mirai-spring-boot-starter
README
# mirai-spring-boot-starter
一个简单的springboot starter,可让你在springboot生态中使用mirai开发机器人
# 开始使用
```
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.mzdluo123:mirai-spring-boot-starter:版本号'
}
```
最新版本号:[![](https://jitpack.io/v/mzdluo123/mirai-spring-boot-starter.svg)](https://jitpack.io/#mzdluo123/mirai-spring-boot-starter)添加以下配置
```
mirai.uid= qq号
mirai.password= 密码
```程序启动后将自动完成登录
# 编写代码
**请使用`Kotlin1.4`版本,1.5版本存在问题**
```kotlin
@Controller
class TestController: SimpleListenerHost() {@Autowired
lateinit var bot:Bot@EventHandler
suspend fun onGroupMessage(event:GroupMessageEvent){
// 编写你的代码吧
}
}
```