Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simple-robot/core
Simple Robot v4 临时开发仓库
https://github.com/simple-robot/core
simbot
Last synced: 26 days ago
JSON representation
Simple Robot v4 临时开发仓库
- Host: GitHub
- URL: https://github.com/simple-robot/core
- Owner: simple-robot
- License: lgpl-3.0
- Created: 2023-10-13T14:01:18.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-09T12:12:49.000Z (12 months ago)
- Last Synced: 2024-01-09T19:31:26.702Z (12 months ago)
- Topics: simbot
- Language: Kotlin
- Homepage:
- Size: 946 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
## Simple Robot v4
> [!important]
> 此仓库是 Simple Robot v4 版本的**临时**开发仓库,会在大部分基本工作都完成或接近尾声的时候合并至 [主仓库](https://github.com/simple-robot/simpler-robot)
> 的相关分支并移除此仓库。> [!warning]
> 本仓库内容已经迁移至 [simpler-robot v4-dev分支](https://github.com/simple-robot/simpler-robot/tree/v4-dev) 。```kotlin
val application = launchApplication(Simple) {
config {
// 部分配置属性...
}eventDispatcher {
// 事件调度器配置....
}// 安装组件或插件
install(...)
}// 使用事件调度器
val eventDispatcher = application.eventDispatchereventDispatcher.register {
// 注册事件处理器
}eventDispatcher.listen { event -> // this: EventContext
// 指定类型地注册事件处理器
}// push(event) -> Flow
eventDispatcher.push(event).collect {
// ...
}// 使用Bot管理器
val botManager = application.botManagers.get()// ...
```