InputListenerMapImpl

InputListener implementation based on ConcurrentHashMap

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun del(telegramId: Long)

Delete waiting input

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

Asynchronously delete current waiting input of user.

Link copied to clipboard
open override fun get(telegramId: Long): String?

Get waiting input of user

open operator fun get(user: User): String?

Get operator shortcut function for getting value.

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

Asynchronously get current waiting input of user.

Link copied to clipboard
open override fun set(telegramId: Long, identifier: String)

Set new waiting input

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)

Set new waiting point

Link copied to clipboard
open suspend override fun setAsync(telegramId: Long, identifier: String): Deferred<Boolean>
open suspend fun setAsync(telegramId: Long, identifier: () -> String): Deferred<Boolean>

Asynchronously set new waiting point

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.

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

Set chain for input listening.