<!--suppress HtmlDeprecatedAttribute -->
<div align="center">
<a href="https://simbot.forte.love/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".simbot/logo-dark.svg">
<source media="(prefers-color-scheme: light)" srcset=".simbot/logo.svg">
<img alt="simbot logo" src=".simbot/logo.svg" width="260" />
</picture>
</a>
<h2>
- Simple Robot -
</h2>
<small>
~ simbot v4 ~
</small>
<br>
<span>
<a href="https://github.com/simple-robot/simpler-robot" target="_blank">GitHub</a>
</span>
|
<span>
<a href="https://gitee.com/simple-robot/simpler-robot" target="_blank">Gitee</a>
</span> <br />
<small> > 感谢 <a href="https://github.com/ForteScarlet/CatCode" target="_blank">CatCode</a> 开发团队成员制作的simbot logo < </small>
<br>
<small> > 走过路过,不要忘记点亮一颗⭐喔~ < </small>
<br>
<a href="https://github.com/simple-robot/simpler-robot/releases/latest"><img alt="release" src="https://img.shields.io/github/v/release/simple-robot/simpler-robot" /></a>
<a href="https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/" target="_blank">
<img alt="release" src="https://img.shields.io/maven-central/v/love.forte.simbot/simbot-api" /></a>
<a href="https://simbot.forte.love" target="_blank">
<img alt="doc" src="https://img.shields.io/badge/doc-simbot-brightgreen" /></a>
<a href="https://qodana.cloud/projects/p9mmM/reports/79Xen" target="_blank">
<img alt="Qodana" src="https://github.com/simple-robot/simpler-robot/actions/workflows/qodana_code_quality.yml/badge.svg" /></a>
<hr>
<img alt="stars" src="https://img.shields.io/github/stars/simple-robot/simpler-robot" />
<img alt="forks" src="https://img.shields.io/github/forks/simple-robot/simpler-robot" />
<img alt="watchers" src="https://img.shields.io/github/watchers/simple-robot/simpler-robot" />
<img alt="repo-size" src="https://img.shields.io/github/repo-size/simple-robot/simpler-robot" />
<img alt="code-size" src="https://img.shields.io/github/languages/code-size/simple-robot/simpler-robot" />
<img alt="issues" src="https://img.shields.io/github/issues-closed/simple-robot/simpler-robot?color=green" />
<img alt="last-commit" src="https://img.shields.io/github/last-commit/simple-robot/simpler-robot" />
<img alt="search-hit" src="https://img.shields.io/github/search/simple-robot/simpler-robot/simbot" />
<img alt="top-language" src="https://img.shields.io/github/languages/top/simple-robot/simpler-robot" />
<a href="./COPYING"><img alt="copying" src="https://img.shields.io/github/license/simple-robot/simpler-robot" /></a>
<br>
</div>
[English](README_en.md)
## 简介
**`Simple Robot`** (v4) 是一个基于[Kotlin协程](https://github.com/Kotlin/kotlinx.coroutines)
的[Kotlin多平台](https://kotlinlang.org/docs/multiplatform.html)
**Bot风格**高性能异步事件调度框架(下文简称simbot),
异步高效、Java友好~
simbot提供统一的异步API和易用的风格设计,可以协助你更快速高效的编写**Bot风格**的事件调度应用。
主要应用于对接各种类型的Bot应用平台/框架,并提供部分组件库实现。
simbot的**平台功能**由组件驱动,安装不同的组件库来获得不同的功能支持。
举个例子,在simbot中使用KOOK和QQ频道:
```Kotlin
suspend fun main() {
val application = launchSimpleApplication {
// 安装KOOK和QQ频道组件库
useKook()
useQQGuild()
}
application.kookBots {
// ... 注册kook bot,并在此之后可处理到kook的相关事件
register(...) { ... }.start()
}
application.qqGuildBots {
// ... 注册QQ频道bot,并在此之后可处理到QQ频道的相关事件
register(...) { ... }.start()
}
// 注册各种事件处理器
application.listeners {
// 注册一个事件处理器
// ChatChannelMessageEvent 是由simbot API定义的泛用类型,代表所有子频道消息事件
// 其中就包括QQ频道的公域消息事件, 或者KOOK的频道消息事件
listen<ChatChannelMessageEvent> {
println("context: $this")
println("context.event: $event")
// 返回事件处理结果
EventResult.empty()
}
// 再注册一个事件处理器
// 明确监听QQ频道的公域消息事件
// 使用 process 不需要返回值
process<QGAtMessageCreateEvent> {
println("context: $this")
println("context.event: $event")
}
// 再注册一个事件处理器
// 明确监听KOOK的频道消息事件
// 使用 process 不需要返回值
process<KookChannelMessageEvent> {
println("context: $this")
println("context.event: $event")
}
}
}
```
## 文档与引导
- [组织首页](https://github.com/simple-robot/) 了解更多有关组件、文档、以及社群等相关信息!
- [社群](https://simbot.forte.love/communities.html) 文档中也有提供社群信息喔
- [应用手册][doc-homepage]
- [文档引导站&API文档](https://docs.simbot.forte.love)
> 切换分支到 [v3-dev](https://github.com/simple-robot/simpler-robot/tree/v3-dev) 可查看 simbot v3 的历史分支。
## 协助我们
为我们点亮一个 **✨star🌟** 便是能够给予我们继续走下去的最大动力与支持!
- 阅读 [贡献指南](docs/CONTRIBUTING_CN.md) 来了解如何贡献你的力量!
- 你可以通过 [**讨论区**][discussions] 与其他人或者simbot开发团队相互友好交流。
- 如果你通过此项目创建了一个很酷的开源项目,欢迎通过 [ISSUES][issues]、[讨论区][discussions]
等方式留下你的开源项目信息,并将你酷酷的项目展示在作品展示区。
## 联系我们
- 如果想要反馈问题、提出建议建议或提出问题,请通过 [**ISSUES**][issues]。
- 如果想要与开发团队交流、与其他开发者交流,请前往 [**讨论区**][discussions]。
- 可以前往 [GitHub 组织首页](https://github.com/simple-robot/) 查看更多**社群信息**。
[pr]: https://github.com/simple-robot/simpler-robot/pulls
[issues]: https://github.com/simple-robot/simpler-robot/issues
[discussions]: https://github.com/orgs/simple-robot/discussions
## 特别鸣谢
<a href="https://www.jetbrains.com/?from=simpler-robot">
<img src=".simbot/jetbrains.svg" width="200" alt="jetbrains" />
</a>
感谢 [Jetbrains][jetbrains] 为团队提供的免费授权,也希望大家能够支持 [Jetbrains][jetbrains] 及其产品,支持正版。
[jetbrains]: https://www.jetbrains.com/?from=simpler-robot
## 星星!
[![Star History Chart](https://api.star-history.com/svg?repos=simple-robot/simpler-robot&type=Date)](https://star-history.com/#simple-robot/simpler-robot&Date)
> powered by [Star History](https://star-history.com)
## License
Simple Robot 使用 [LGPLv3](https://www.gnu.org/licenses/#LGPL) 协议开源。
```
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Lesser GNU General Public License for more details.
You should have received a copy of the Lesser GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
```
[doc-homepage]: https://simbot.forte.love/
没有合适的资源?快使用搜索试试~ 我知道了~
一个基于Kotlin协程的bot风格Kotlin多平台事件调度框架,异步高效.zip
共583个文件
kt:385个
md:84个
kts:36个
需积分: 5 0 下载量 160 浏览量
2024-05-15
14:17:18
上传
评论
收藏 1.04MB ZIP 举报
温馨提示
创建一种兼容Java的语言 让它比Java更安全,能够静态检测常见的陷阱。如:引用空指针 让它比Java更简洁,通过支持variable type inference,higher-order functions (closures),extension functions,mixins and first-class delegation等实现。 让它比最成熟的竞争对手Scala语言更加简单。 其基础编译器(他们将其改为kompiler——开创了一系列以K字打头的用语——甚至连 contributors这类词他们也用改成了kontributors)可以被独立出来并嵌入到 Maven、Ant 或 Gradle 工具链中。这使得在 IDE 中开发的代码能够利用已有的机制来构建,从而尽可能的减少了在新环境中使用所受的干预,哪怕与那些没有安装 Kotlin 插件的开发人员一起合作项目也没有问题。 The IntelliJ Kotlin 插件扩展了 Java 编译器使得 Kotlin 代码能够得以编写、编译和调试。除此之外,关于基本的 Java 集合,已经有编写好
资源推荐
资源详情
资源评论
收起资源包目录
一个基于Kotlin协程的bot风格Kotlin多平台事件调度框架,异步高效.zip (583个子文件)
A 0B
gradlew.bat 3KB
kdoc.yml.bk 1KB
COPYING 34KB
kdoc-style.css 191B
.editorconfig 61KB
.gitignore 3KB
.gitignore 837B
.gitignore 151B
.gitmodules 101B
gradlew 9KB
JavaBlockingRunTest.java 3KB
module-info.java 2KB
module-info.java 1KB
JEventInterceptorTest.java 1KB
ResourceTests.java 1KB
module-info.java 981B
module-info.java 922B
module-info.java 775B
module-info.java 562B
module-info.java 370B
module-info.java 356B
module-info.java 328B
module-info.java 264B
module-info.java 199B
module-info.java 196B
module-info.java 159B
module-info.java 149B
module-info.java 127B
module-info.java 112B
module-info.java 111B
module-info.java 106B
settings.json 37B
BlockingRunner.kt 39KB
ID.kt 38KB
KFunctionEventListenerProcessor.kt 26KB
DefaultSimbotApplicationProcessor.kt 18KB
Messages.kt 17KB
Collectables.jvm.kt 16KB
SimpleEventDispatcherImpl.kt 15KB
EventResult.kt 15KB
EventListener.jvm.kt 14KB
SuspendTransformTests.kt 14KB
Attribute.kt 13KB
Resource.jvm.kt 13KB
StandardMessages.kt 12KB
maps.native.kt 12KB
atomic.kt 12KB
AtomicTests.kt 12KB
SimbotLogger.kt 11KB
UUIDs.kt 11KB
EventProcessor.kt 10KB
EventResult.jvm.kt 10KB
ContinuousSession.kt 10KB
Filter.kt 10KB
SuspendTransforms.kt 10KB
concurrentQueues.native.kt 10KB
Async.kt 9KB
DeleteSupport.kt 9KB
AbstractContinuousSessionContext.kt 9KB
atomic.jvm.kt 9KB
Bot.kt 9KB
SuspendTransforms.kt 9KB
SimpleApplicationFactory.kt 9KB
maps.wasmjs.kt 9KB
maps.js.kt 9KB
ContinuousSessionTest.kt 9KB
AnnotationDataPropertiesGeneratorProcessor.kt 9KB
SimpleBinderManager.kt 9KB
ApplicationFactory.kt 9KB
SimbotLoggerConfiguration.kt 9KB
StandardMessages.jvm.kt 8KB
SpringApplicationConfigurationProperties.kt 8KB
atomic.native.kt 8KB
Collectable.kt 8KB
GenerateChangelog.kt 8KB
atomic.js.kt 8KB
atomic.wasmjs.kt 8KB
ResolveBinderManagerProcessor.kt 8KB
ContinuousSessionContext.kt 8KB
FunctionalBindableEventListener.kt 7KB
SimpleApplicationTests.kt 7KB
SpringApplication.kt 7KB
SuspendReserves.jvm.kt 7KB
DispatcherConfiguration.kt 7KB
EventListenerRegistrar.kt 7KB
ApplicationEventHandler.kt 7KB
SimbotLoggerProvider.kt 6KB
AbstractSimpleLogger.kt 6KB
Async.jvm.kt 6KB
EventParameterBinder.kt 6KB
MessageReceipts.kt 6KB
AppTest.kt 6KB
AnnotationEventInterceptorFactory.kt 6KB
maps.kt 6KB
SimbotEventListenerFunctionProcessor.kt 6KB
MergeableFactoriesConfigurator.kt 6KB
ConsoleSimbotLoggerProcessor.kt 6KB
MessageReceipt.kt 6KB
ComponentTests.kt 6KB
共 583 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
野生的狒狒
- 粉丝: 2815
- 资源: 2233
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功