Skip to content

Heapy/kotbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

340 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kotbot Build

Bot API 9.4

Install the library

implementation("io.heapy.kotbot:core:1.5.0")

Example

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()
        .collect(::println)
}

Packages

 
 
 

Contributors 7

Languages