{"id":22588924,"url":"https://github.com/simple-robot/simbot-component-kritor","last_synced_at":"2025-07-22T16:02:42.471Z","repository":{"id":229001546,"uuid":"775436543","full_name":"simple-robot/simbot-component-kritor","owner":"simple-robot","description":"(WIP) 一个对Kritor协议作为客户端进行实现的 Simple Robot 组件库，Java 友好、异步高效~ 🐱🐱🐱","archived":false,"fork":false,"pushed_at":"2024-04-10T10:06:55.000Z","size":333,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T21:45:34.765Z","etag":null,"topics":["kotlin","kotlin-coroutines","kotlin-multiplatform","kotlin-multiplatform-library","kritor","simbot","simbot-component"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simple-robot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"ForteScarlet","patreon":"ForteScarlet","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-03-21T11:43:14.000Z","updated_at":"2024-04-24T08:59:42.000Z","dependencies_parsed_at":"2024-04-10T11:26:34.642Z","dependency_job_id":"9da041a6-47fe-4629-9aab-f4a3c4e1a883","html_url":"https://github.com/simple-robot/simbot-component-kritor","commit_stats":null,"previous_names":["simple-robot/simbot-component-kritor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-kritor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-kritor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-kritor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-kritor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simple-robot","download_url":"https://codeload.github.com/simple-robot/simbot-component-kritor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305878,"owners_count":21081562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","kotlin-coroutines","kotlin-multiplatform","kotlin-multiplatform-library","kritor","simbot","simbot-component"],"created_at":"2024-12-08T08:11:34.923Z","updated_at":"2025-04-10T21:45:45.850Z","avatar_url":"https://github.com/simple-robot.png","language":"Kotlin","funding_links":["https://github.com/sponsors/ForteScarlet","https://patreon.com/ForteScarlet"],"categories":[],"sub_categories":[],"readme":"\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\".simbot/logo-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\".simbot/logo.svg\"\u003e\n  \u003cimg alt=\"simbot logo\" src=\".simbot/logo.svg\" width=\"260\" /\u003e\n\u003c/picture\u003e\n\u003ch2\u003e\n    ~ Simple Robot ~ \u003cbr/\u003e \u003csmall\u003eKritor Component\u003c/small\u003e\n\u003c/h2\u003e\n\u003ca href=\"https://github.com/simple-robot/simbot-component-kritor/releases/latest\"\u003e\u003cimg alt=\"release\" src=\"https://img.shields.io/github/v/release/simple-robot/simbot-component-kritor\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://repo1.maven.org/maven2/love/forte/simbot/component/simbot-component-kritor-api/\" target=\"_blank\"\u003e\n  \u003cimg alt=\"release\" src=\"https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-kritor-api\" /\u003e\u003c/a\u003e\n   \u003chr\u003e\n   \u003cimg alt=\"stars\" src=\"https://img.shields.io/github/stars/simple-robot/simbot-component-kritor\" /\u003e\n   \u003cimg alt=\"forks\" src=\"https://img.shields.io/github/forks/simple-robot/simbot-component-kritor\" /\u003e\n   \u003cimg alt=\"watchers\" src=\"https://img.shields.io/github/watchers/simple-robot/simbot-component-kritor\" /\u003e\n   \u003cimg alt=\"repo size\" src=\"https://img.shields.io/github/repo-size/simple-robot/simbot-component-kritor\" /\u003e\n   \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues-closed/simple-robot/simbot-component-kritor?color=green\" /\u003e\n   \u003cimg alt=\"last commit\" src=\"https://img.shields.io/github/last-commit/simple-robot/simbot-component-kritor\" /\u003e\n   \u003ca href=\"./COPYING\"\u003e\u003cimg alt=\"copying\" src=\"https://img.shields.io/github/license/simple-robot/simbot-component-kritor\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n\nSimple Robot Kritor 组件是一个将\n[Kritor](https://github.com/KarinJS/kritor)\n协议在\n[Simple Robot](http://github.com/simple-robot/simpler-robot) 标准API下实现的组件库，\n并由此提供simbot中的各项能力。\n\n\u003e [!caution]\n\u003e WIP now.\n\n## 使用\n\n## 文档\n\n## Examples\n\n使用simbot核心库\n\n```Kotlin\nval application = launchSimpleApplication {\n    useKritor() // 安装使用Kritor组件库\n}\n\napplication.kritorBots {\n    // 注册bot并启动\n    retister(account = \"\", ticket = \"\") {\n        // config...\n    }.also { it.start() }\n}\n\n// 注册事件处理器\napplication.listeners {\n    // 处理事件 ChatGroupMessageEvent\n    // 这是simbot API定义的泛用类型\n    process\u003cChatGroupMessageEvent\u003e {\n        // ...\n    }\n\n    // 指定处理 Kritor 组件内定义的各事件类型\n    // 比如此处的 Kritor 群消息事件\n    // Tips: KritorGroupMessageEvent 继承实现 ChatGroupMessageEvent\n    process\u003cKritorGroupMessageEvent\u003e { event -\u003e\n        // 基于事件回复消息\n        event.reply(\"Hello, \")\n        // 基于 Group 实例发送消息\n        event.content().send(Text { \"World!\" })\n    }\n}\n```\n\n使用Spring Boot starter\n\n配置信息:\n\n```json\n{\n  \"component\": \"simbot.kritor\",\n  \"auth\": {\n    \"account\": \"\",\n    \"ticket\": \"\",\n    \"channel\": {\n        \"type\": \"address\",\n        \"name\": \"localhost\",\n        \"port\": 8080\n    }\n  },\n  \"config\": {\n  }\n}\n```\n\n```Kotlin\n@SpringBootApplication\n@EnableSimbot // 启动simbot\nclass MainApp\n\n// 默认配置下，simbot会自动扫描并加载配置的bot信息，\n// 并默认地自动启动它们\n\nfun main(args: Array\u003cString\u003e) {\n    runApplication\u003cMainApp\u003e(*args)\n}\n\n/** 一些事件处理器的载体 */\n@Component\nclass MyHandler {\n    /** 监听处理 kritor 的群消息事件 */\n    @Listener\n    suspend fun onMessage(event: KritorGroupMessageEvent) {\n        // 基于事件回复消息\n        event.reply(\"Hello, \")\n        // 基于 Group 实例发送消息\n        event.content().send(Text { \"World!\" })\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-robot%2Fsimbot-component-kritor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-robot%2Fsimbot-component-kritor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-robot%2Fsimbot-component-kritor/lists"}