InputListener

interface InputListener

Bot input listener, see Waiting Input example in article

Inheritors

Functions

Link copied to clipboard
abstract fun del(telegramId: Long)

Delete current waiting input of user.

Link copied to clipboard
abstract suspend fun delAsync(telegramId: Long): Deferred<Boolean>

Asynchronously delete current waiting input of user.

Link copied to clipboard
open operator fun get(user: User): String?

Get operator shortcut function for getting value.

abstract fun get(telegramId: Long): String?

Get current waiting input of user.

Link copied to clipboard
abstract suspend fun getAsync(telegramId: Long): Deferred<String?>

Asynchronously get current waiting input of user.

Link copied to clipboard
open fun set(user: User, identifier: () -> String)

Shortcut function for set method.

open operator fun set(user: User, identifier: String)

Set operator shortcut function for setting value.

open fun set(telegramId: Long, identifier: () -> String)
abstract fun set(telegramId: Long, identifier: String)

Set new waiting point

Link copied to clipboard
open suspend fun setAsync(user: User, identifier: () -> String): Deferred<Boolean>
open suspend fun setAsync(user: User, identifier: String): Deferred<Boolean>

Shortcut function for setAsync method.

open suspend fun setAsync(telegramId: Long, identifier: () -> String): Deferred<Boolean>
abstract suspend fun setAsync(telegramId: Long, identifier: String): Deferred<Boolean>

Asynchronously set new waiting point

Link copied to clipboard
fun <T : Link<*>> InputListener.setChain(user: User, firstLink: T)

Set chain for input listening.