Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
love.forte.simbot:simbot-logger-tvosarm64
Advanced tools
Simple Robot,一个通用的bot风格事件调度框架,以灵活的统一标准来编写bot应用。
Simple Robot
是一个JVM平台(和多平台)的bot风格事件调度框架(下文简称simbot),提供统一的异步API和易用的风格设计,可以协助你更快速高效的编写bot风格的事件调度应用。
目前主要应用于对接各种类型的bot应用平台/框架,并提供统一的API实现。
simbot
通过 Kotlin 语言开发并兼容Java(jdk8+)等JVM平台语言,且提供Javaer最爱的Spring Boot Starter,协助你快速开发。
如果你想参考simbot2, 可以参考 simple-robot-v2
对于使用文档,可以去看看 Simple Robot 3 官方网站 (建议开启“魔法”访问), 而API文档则可以前往 文档引导站点 寻找并查看。API文档归根随着版本的发布而同步更新。
而这些内容,你都可以在 Simple Robot 图书馆 处找到。
在simbot3相关的系列组件中,大部分需要依赖第三方库(也有可能是由simbot团队实现的)的组件,基本上都会使用独立的仓库进行管理,
并且会尽量遵循simbot3的 命名概述 中所约定的规则。
simbot3目前已经实现的组件有:
组件目标 | 主要成员 | 仓库地址 | 状态 |
---|---|---|---|
Mirai | simbot team | simple-robot/simbot-component-mirai | 维护中 |
Kook(开黑啦) | simbot team | simple-robot/simbot-component-kook | 维护中 |
QQ频道 | simbot team | simple-robot/simbot-component-qq-guild | 维护中 |
米游社大别野 | simbot team | simple-robot/simbot-component-miyoushe | 计划中 |
有关于这些组件等simbot附属内容的相关信息,你可以从 Simple Robot 附属组织库 处查看~
你可以前往 官方网站 的文档内查看与快速开始有关的内容。
如果你想要时刻关注版本的发布信息,你可以通过GitHub的 Watch 功能来订阅包括 Releases 在内的各种仓库资讯。
如果你感兴趣,可以时不时的去 Simple Robot Blog 看一看, 那里会有基本上每周更新的 周报 以及一些其他可能不定时更新发布的博客,或者碎碎念!
为我们点亮一个**✨star🌟**便是能够给予我们继续走下去的最大动力与支持!
事件监听(标准库)
suspend fun main() {
// 构建Application
val app = createSimpleApplication { }
// 注册监听函数
app.eventListenerManager.listeners {
// 注册一个 '好友消息' 事件
FriendMessageEvent { event ->
event.reply("你也好")
} onMatch { textContent == "你好" }
}
// 挂起并直到被关闭
app.join()
}
事件监听(BOOT)
@Listener
@Filter("喵{1,3}") // match: 喵,喵喵,喵喵喵
suspend fun FriendMessageEvent.onEvent() {
// ...
}
@Listener
@ContentTrim // 匹配前trim
@Filter("喵{1,3}") // match: 喵,喵喵,喵喵喵
suspend fun FriendMessageEvent.onEvent() {
// ...
}
消息发送
@Listener
suspend fun GroupMessageEvent.onEvent() {
group().send(At(114.ID) + "喵!".toText() + Face(514.ID))
}
会话
@Listener
suspend fun FriendMessageEvent.onEvent(session: ContinuousSessionContext) {
// import love.forte.simbot.event.invoke
val nextEvent: FriendMessageEvent = session { next(FriendMessageEvent) }
session {
val next1: FriendMessageEvent = next(FriendMessageEvent)
val next2: FriendMessageEvent = next(FriendMessageEvent)
val next3: FriendMessageEvent = next(FriendMessageEvent)
// ...
}
}
Java(Spring Boot Starter)
@SpringBootApplication
@EnableSimbot // 启用
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
/** 事件监听 */
@Listener
public void onFriendMessage(FriendMessageEvent event) {
event.replyBlocking("Hello, ");
event.getFriend().sendAsync("Simbot");
// 阻塞或异步的不同风格的Java API
}
}
感谢 Jetbrains 为团队提供的免费授权,也希望大家能够支持 Jetbrains 及其产品,支持正版。
powered by Star History
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 GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see
<https://www.gnu.org/licenses/>.
Simple Robot 3 以 LGPLv3
协议开源。
FAQs
Simple Robot,一个通用的bot风格事件调度框架,以灵活的统一标准来编写bot应用。
We found that love.forte.simbot:simbot-logger-tvosarm64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.