{"id":22588923,"url":"https://github.com/simple-robot/simbot-component-telegram","last_synced_at":"2026-02-26T06:51:02.723Z","repository":{"id":224346344,"uuid":"762658441","full_name":"simple-robot/simbot-component-telegram","owner":"simple-robot","description":"A Kotlin multiplatform Telegram bot SDK, A Simple Robot Component library 🔥🔥❤️‍🔥 ","archived":false,"fork":false,"pushed_at":"2025-02-17T14:53:22.000Z","size":1079,"stargazers_count":3,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"dev/main","last_synced_at":"2025-04-10T21:45:19.904Z","etag":null,"topics":["kotlin","kotlin-coroutines","kotlin-multiplatform","kotlin-multiplatform-library","simbot","simbot-component","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-sdk"],"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":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null,"zenodo":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-02-24T10:28:14.000Z","updated_at":"2024-11-26T07:18:14.000Z","dependencies_parsed_at":"2025-04-10T21:55:22.194Z","dependency_job_id":null,"html_url":"https://github.com/simple-robot/simbot-component-telegram","commit_stats":null,"previous_names":["simple-robot/simbot-component-telegram"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/simple-robot/simbot-component-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simple-robot","download_url":"https://codeload.github.com/simple-robot/simbot-component-telegram/tar.gz/refs/heads/dev/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-robot%2Fsimbot-component-telegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29851005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","simbot","simbot-component","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-sdk"],"created_at":"2024-12-08T08:11:34.323Z","updated_at":"2026-02-26T06:51:02.709Z","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\u003eTelegram Component\u003c/small\u003e\n\u003c/h2\u003e\n\u003ca href=\"https://github.com/simple-robot/simbot-component-telegram/releases/latest\"\u003e\u003cimg alt=\"release\" src=\"https://img.shields.io/github/v/release/simple-robot/simbot-component-telegram\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://repo1.maven.org/maven2/love/forte/simbot/component/simbot-component-telegram-api/\" target=\"_blank\"\u003e\n  \u003cimg alt=\"release\" src=\"https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-telegram-api\" /\u003e\u003c/a\u003e\n   \u003chr\u003e\n   \u003cimg alt=\"stars\" src=\"https://img.shields.io/github/stars/simple-robot/simbot-component-telegram\" /\u003e\n   \u003cimg alt=\"forks\" src=\"https://img.shields.io/github/forks/simple-robot/simbot-component-telegram\" /\u003e\n   \u003cimg alt=\"watchers\" src=\"https://img.shields.io/github/watchers/simple-robot/simbot-component-telegram\" /\u003e\n   \u003cimg alt=\"repo size\" src=\"https://img.shields.io/github/repo-size/simple-robot/simbot-component-telegram\" /\u003e\n   \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues-closed/simple-robot/simbot-component-telegram?color=green\" /\u003e\n   \u003cimg alt=\"last commit\" src=\"https://img.shields.io/github/last-commit/simple-robot/simbot-component-telegram\" /\u003e\n   \u003ca href=\"./COPYING\"\u003e\u003cimg alt=\"copying\" src=\"https://img.shields.io/github/license/simple-robot/simbot-component-telegram\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n[中文](README_CN.md) | _English_\n\n\u003e [!caution]\n\u003e WIP.\n\u003e \n\u003e Some thoughts? \n\u003e [Feel free to share](https://github.com/simple-robot/simbot-component-telegram/issues)\n\u003e or join the [communities](https://simbot.forte.love/communities.html).\n\n\u003e [!warning]\n\u003e This content is machine-translated.\n\nThis is a [**Telegram Bot**][telegram bot doc] API/SDK Kotlin multi-platform library based on \n[Kotlin coroutines](https://github.com/Kotlin/kotlinx.coroutines), \nefficient and asynchronous, Java-friendly.\n\nIt is also a component library of [Simple Robot v4][simbot4 gh] (simbot), which is a subproject of simbot.\nWith the capabilities provided by the simbot core library, it can support more advanced encapsulation,\nas well as component collaboration, Spring support, and more.\n\n\u003e Serialization and network requests are based on [Kotlin serialization](https://github.com/Kotlin/kotlinx.serialization) and [Ktor](https://ktor.io/).\n\n## Documentation\n\n- **Telegram Component** Reference Manual: (to be built)\n- Learn about simbot: [**The Simple Robot Reference Manual**][simbot doc]\n- **API Documentation**: [**The KDoc of Telegram Component**](https://docs.simbot.forte.love/components/telegram) in the [**document guide site**](https://docs.simbot.forte.love). \n- [**Communities**](https://simbot.forte.love/communities.html): Have fun interacting with us and other developers!\n\n## Setup\n\nTo use the simbot component library, you first need to add the core implementation of simbot\n(such as the core library (`simbot-core`) or Spring Boot starter (`simbot-core-spring-boot-starter`)),\nand then add the component library dependencies of the Telegram (`simbot-component-telegram-core`).\n\n\u003e [!note]\n\u003e The version of the simbot core implementation library (`SIMBOT_VERSION` below) \n\u003e goes [here](https://github.com/simple-robot/simpler-robot/releases) for reference;\n\u003e\n\u003e Telegram Component library versions (`VERSION` below) go to the [release](https://github.com/simple-robot/simbot-component-telegram/releases) reference.\n\n**With simbot core**\n\n### Gradle\n\n`build.gradle.kts`\n\n```kotlin\nplugins {\n    kotlin(\"...\") version \"...\"\n}\n\ndependencies {\n    implementation(\"love.forte.simbot:simbot-core:${SIMBOT_VERSION}\")\n    implementation(\"love.forte.simbot.component:simbot-component-telegram-core:$VERSION\")\n}\n```\n\n### Maven\n\n`pom.xml`\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003elove.forte.simbot\u003c/groupId\u003e\n        \u003cartifactId\u003esimbot-core-jvm\u003c/artifactId\u003e\n        \u003cversion\u003e${SIMBOT_VERSION}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003elove.forte.simbot.component\u003c/groupId\u003e\n        \u003cartifactId\u003esimbot-component-telegram-core-jvm\u003c/artifactId\u003e\n        \u003cversion\u003e${VERSION}\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n**With simbot spring boot starter**\n\n### Gradle\n\n`build.gradle.kts`\n\n```kotlin\nplugins {\n    kotlin(\"jvm\") version \"...\"\n}\n\ndependencies {\n    implementation(\"love.forte.simbot:simbot-core-spring-boot-starter:${SIMBOT_VERSION}\")\n    implementation(\"love.forte.simbot.component:simbot-component-telegram-core:$VERSION\")\n}\n```\n\n### Maven\n\n`pom.xml`\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003elove.forte.simbot\u003c/groupId\u003e\n        \u003cartifactId\u003esimbot-core-spring-boot-starter\u003c/artifactId\u003e\n        \u003cversion\u003e${SIMBOT_VERSION}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003elove.forte.simbot.component\u003c/groupId\u003e\n        \u003cartifactId\u003esimbot-component-telegram-core-jvm\u003c/artifactId\u003e\n        \u003cversion\u003e${VERSION}\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### Ktor client engine\n\nThe Telegram component uses Ktor as the HTTP client implementation,\nbut does not rely on any specific engine by default.\n\nTherefore, you need to choose and use a Ktor Client engine implementation.\n\nYou can go to the [Ktor documentation](https://ktor.io/docs/client-engines.html)\nto select a suitable Client Engine for your platform.\n\nTake the JVM platform as an example:\n\n\u003cdetails open\u003e\u003csummary\u003eGradle\u003c/summary\u003e\n\n```kotlin\nruntimeOnly(\"io.ktor:ktor-client-java:$ktor_version\")\n```\n\n\u003c/details\u003e\n\n\u003cdetails \u003e\u003csummary\u003eMaven\u003c/summary\u003e\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.ktor\u003c/groupId\u003e\n    \u003cartifactId\u003ektor-client-java-jvm\u003c/artifactId\u003e\n    \u003cversion\u003e${ktor_version}\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n\u003c/details\u003e\n\n## Examples\n\n**simbot core**\n\n```Kotlin\nsuspend fun main() {\n    val app = launchSimpleApplication { \n        useTelegram() // install Telegram Component\n    }\n\n    // subscribe to events\n    app.listeners {\n        // subscribe to ChatGroupMessageEvent \n        listen\u003cChatGroupMessageEvent\u003e { event -\u003e\n            // process event...\n            event.reply(\"Hello!\")\n            event.reply(At(event.authorId) + \"Where are you?\".toText())\n\n            // Required an result\n            EventResult.empty()\n        }\n\n        // subscribe to ChatGroupMessageEvent\n        process\u003cTelegramPrivateMessageEvent\u003e { event -\u003e\n            // process event...\n            event.content().send(\"Welcome, \" + At(event.member().id))\n\n            // Without result in `process\u003cT\u003e` \n        }\n    }\n    \n    // register bots\n    app.telegramBots {\n        // register a bot via token\n        val bot = register(token = \"botaaabbb.123123444\") {\n            // Config...\n            // The source stdlib bot config \n            botConfiguration {\n                apiClientConfigurer {\n                    engine {\n                        // A proxy?\n                        proxy = ProxyBuilder.http(\"http://127.0.0.1:7790\")\n                    }\n                }\n\n                // Enable longPolling?\n                longPolling = LongPolling(\n                    limit = 100,\n                    timeout = 10.minutes.inWholeSeconds.toInt(),\n                    allowedUpdates = setOf(UpdateValues.MESSAGE_NAME),\n                    // Enable retry?\n                    retry = LongPolling.Retry()\n                )\n            }\n        }\n\n        // start the bot\n        bot.start()\n    }\n\n    \n    app.join()   \n}\n```\n\n**simbot Spring Boot starter**\n\n```Kotlin\n@SpringBootApplication\n@EnableSimbot // enable\nclass App\n\nfun main(args: Array\u003cString\u003e) {\n    runApplication\u003cApp\u003e(*args)\n}\n\n@Component\nclass MyHandles {\n\n    @Listener // subscribe to ChatGroupMemberIncreaseEvent\n    suspend fun handleMemberIncrease(event: ChatGroupMemberIncreaseEvent) {\n        // ...\n    }\n    \n    @Filter(\"Hello.*\")\n    @Listener // subscribe to ChatGroupMessageEvent\n    suspend fun handleGroupMessage(event: ChatGroupMessageEvent) {\n        event.reply(\"Hello!\")\n    }\n}\n```\nThe configuration file `*.bot.json`\n\n\u003e Comments are not supported.\n\u003e Remember to clean them up when you use them.\n\n```json5\n{\n    \"component\": \"simbot.telegram\",\n    \"ticket\": {\n        \"token\": \"Your FULL Bot Token, e.g. Bot123456789:aaaabbbbcccc\"\n    },\n    // config and its properties are optional and default to `null`.\n    \"config\": {\n        \"server\": null,\n        \"proxy\": null,\n        \"longPolling\": null\n    }\n}\n```\n\n\n```json5\n{\n    \"component\": \"simbot.telegram\",\n    \"ticket\": {\n        \"token\": \"Your FULL Bot Token, e.g. Bot123456789:aaaabbbbcccc\"\n    },\n    // config and its properties are optional and default to `null`.\n    \"config\": {\n        \"server\": null,\n        \"proxy\": null,\n        // config the `longPolling` to subscribe evnets\n        \"longPolling\": {\n            \"limit\": 100\n        }\n    }\n}\n```\n\n## CONTRIBUTING\n\nSee [CONTRIBUTING.md](docs/CONTRIBUTING.md) for more information! \n\nWe welcome you and look forward to it\n[feedback](https://github.com/simple-robot/simbot-component-telegram/issues)\nor\n[pull request](https://github.com/simple-robot/simbot-component-telegram/pulls),\nThank you for your contribution and support!\n\n## License\n\n`simbot-component-telegram` is open source under the `LGPLv3` licence。\n\n```\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General \nPublic License as published by the Free Software Foundation, either version 3 of the License, or (at your option) \nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied \nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more \ndetails.\n\nYou should have received a copy of the GNU Lesser General Public License along with this program. \nIf not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n\n[simbot4 gh]: https://github.com/simple-robot/simpler-robot/tree/v4-dev\n[simbot doc]: https://simbot.forte.love\n[telegram bot doc]:https://core.telegram.org/bots/api\n[KMP]: https://kotlinlang.org/docs/multiplatform.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-robot%2Fsimbot-component-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-robot%2Fsimbot-component-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-robot%2Fsimbot-component-telegram/lists"}