@@ -33,144 +33,26 @@ _中文_ | [English](README.md)
33
33
> 或
34
34
> [ 加入社群] ( https://simbot.forte.love/communities.html ) ~
35
35
36
- 这是一个基于 [ Kotlin coroutines ] ( https://github.com/Kotlin/kotlinx.coroutines )
37
- 的 [ ** Telegram Bot** ] [ telegram bot doc ] API/SDK
38
- Kotlin 多平台库 ,异步高效、Java友好。
36
+ ** Telegram组件 **
37
+ 是一个 [ Kotlin 多平台 ] ( https://kotlinlang.org/docs/multiplatform.html ) 的 [ ** Telegram Bot API ** ] [ telegram bot doc ] SDK实现库,
38
+ 也是 Simple Robot 标准API下实现的组件库 ,异步高效、Java友好!
39
39
40
- 它同样是一个 [ Simple Robot v4] [ simbot4 gh ] (下文简称 simbot)
41
- 的组件库,是 simbot 的子项目之一。
42
- 借助 simbot 核心库提供的能力,它可以支持更多高级功能和封装,比如组件协同、Spring支持等。
40
+ > 序列化和网络请求相关分别基于 [ Kotlin serialization] ( https://github.com/Kotlin/kotlinx.serialization )
41
+ > 和 [ Ktor] ( https://ktor.io/ ) .
43
42
44
- 它可以作为一个低级别的 API/SDK 辅助依赖库,
45
- 也可在 simbot 核心库的支持下用作为一个轻量级的快速开发框架!
46
-
47
- 序列化和网络请求相关分别基于 [ Kotlin serialization] ( https://github.com/Kotlin/kotlinx.serialization )
48
- 和 [ Ktor] ( https://ktor.io/ ) .
43
+ > 序列化和网络请求相关分别基于 [ Kotlin serialization] ( https://github.com/Kotlin/kotlinx.serialization )
44
+ > 和 [ Ktor] ( https://ktor.io/ ) .
49
45
46
+
50
47
## 文档
51
48
52
- - ** Telegram组件** 手册:(待建设)
53
- - 了解simbot: [ ** Simple Robot 应用手册** ] ( https://simbot.forte.love )
49
+ - 手册: [ ** Simple Robot 应用手册** ] ( https://simbot.forte.love ) 及其中的 [ ** Telegram组件** ] ( https://simbot.forte.love/component-telegram.html ) 部分。
54
50
- ** API文档** : [ ** 文档引导站点** ] ( https://docs.simbot.forte.love ) 中 Telegram 的 [ ** KDoc站点** ] ( https://docs.simbot.forte.love/components/telegram )
55
51
- [ ** 社群** ] ( https://simbot.forte.love/communities.html ) : 与我们和其他开发者愉快地交流!
56
52
57
-
58
53
## 安装
59
54
60
- To use the simbot component library, you first need to add the core implementation of simbot
61
- (such as the core library (` simbot-core ` ) or Spring Boot starter (` simbot-core-spring-boot-starter ` )),
62
- and then add the component library dependencies of the Telegram (` simbot-component-telegram-core ` ).
63
-
64
- > [ !note]
65
- > The version of the simbot core implementation library (` SIMBOT_VERSION ` below)
66
- > goes [ here] ( https://github.com/simple-robot/simpler-robot/releases ) for reference;
67
- >
68
- > Telegram Component library versions (` VERSION ` below) go to the [ release] ( https://github.com/simple-robot/simbot-component-telegram/releases ) reference.
69
-
70
- ** With simbot core**
71
-
72
- ### Gradle
73
-
74
- ` build.gradle.kts `
75
-
76
- ``` kotlin
77
- plugins {
78
- kotlin(" ..." ) version " ..."
79
- }
80
-
81
- dependencies {
82
- implementation(" love.forte.simbot:simbot-core:${SIMBOT_VERSION } " )
83
- implementation(" love.forte.simbot.component:simbot-component-telegram-core:$VERSION " )
84
- }
85
- ```
86
-
87
- ### Maven
88
-
89
- ` pom.xml `
90
-
91
- ``` xml
92
- <dependencies >
93
- <dependency >
94
- <groupId >love.forte.simbot</groupId >
95
- <artifactId >simbot-core-jvm</artifactId >
96
- <version >${SIMBOT_VERSION}</version >
97
- </dependency >
98
- <dependency >
99
- <groupId >love.forte.simbot.component</groupId >
100
- <artifactId >simbot-component-telegram-core-jvm</artifactId >
101
- <version >${VERSION}</version >
102
- </dependency >
103
- </dependencies >
104
- ```
105
-
106
- ** With simbot spring boot starter**
107
-
108
- ### Gradle
109
-
110
- ` build.gradle.kts `
111
-
112
- ``` kotlin
113
- plugins {
114
- kotlin(" jvm" ) version " ..."
115
- }
116
-
117
- dependencies {
118
- implementation(" love.forte.simbot:simbot-core-spring-boot-starter:${SIMBOT_VERSION } " )
119
- implementation(" love.forte.simbot.component:simbot-component-telegram-core:$VERSION " )
120
- }
121
- ```
122
-
123
- ### Maven
124
-
125
- ` pom.xml `
126
-
127
- ``` xml
128
- <dependencies >
129
- <dependency >
130
- <groupId >love.forte.simbot</groupId >
131
- <artifactId >simbot-core-spring-boot-starter</artifactId >
132
- <version >${SIMBOT_VERSION}</version >
133
- </dependency >
134
- <dependency >
135
- <groupId >love.forte.simbot.component</groupId >
136
- <artifactId >simbot-component-telegram-core-jvm</artifactId >
137
- <version >${VERSION}</version >
138
- </dependency >
139
- </dependencies >
140
- ```
141
-
142
- ### Ktor client engine
143
-
144
- The Telegram component uses Ktor as the HTTP client implementation,
145
- but does not rely on any specific engine by default.
146
-
147
- Therefore, you need to choose and use a Ktor Client engine implementation.
148
-
149
- You can go to the [ Ktor documentation] ( https://ktor.io/docs/client-engines.html )
150
- to select a suitable Client Engine for your platform.
151
-
152
- Take the JVM platform as an example:
153
-
154
- <details open ><summary >Gradle</summary >
155
-
156
- ``` kotlin
157
- runtimeOnly(" io.ktor:ktor-client-java:$ktor_version " )
158
- ```
159
-
160
- </details >
161
-
162
- <details ><summary >Maven</summary >
163
-
164
- ``` xml
165
- <dependency >
166
- <groupId >io.ktor</groupId >
167
- <artifactId >ktor-client-java-jvm</artifactId >
168
- <version >${ktor_version}</version >
169
- <scope >runtime</scope >
170
- </dependency >
171
- ```
172
-
173
- </details >
55
+ 参考手册的 [ ** Telegram组件** ] ( https://simbot.forte.love/component-telegram.html ) 部分。
174
56
175
57
## Examples
176
58
0 commit comments