- Core – Lightweight, opinionated library implementing telegram bot api
- Tgkotbot – Bot implementation for needs of Kotlin Community in the telegram
implementation("io.heapy.kotbot:core:1.0.0")
Execute a single method:
suspend fun main() {
val kotbot = Kotbot(
token = System.getenv("KOTBOT_TOKEN"),
)
kotbot.execute(GetMe())
.also(::println)
}
Subscribe for updates:
suspend fun main() {
val kotbot = Kotbot(
token = System.getenv("KOTBOT_TOKEN"),
)
// Flow, which emits updates
kotbot.receiveUpdates()
.onEach(::println)
}