TelegramBotManager

A BotManager for TelegramBot.

Author

ForteScarlet

Inherited properties

Link copied to clipboard
abstract val isActive: Boolean
Link copied to clipboard
abstract val isCompleted: Boolean

Functions

Link copied to clipboard
abstract override fun all(): Sequence<TelegramBot>
Link copied to clipboard
open override fun configurable(configuration: SerializableBotConfiguration): Boolean
Link copied to clipboard
abstract override fun find(id: ID): TelegramBot?

Find a matching bot by token or user id. if id is a NumericalID, think of it as a User.id for finding. Otherwise, it is treated as a token, then converted to a Long and then treated as a User.id.

Link copied to clipboard
open operator override fun get(id: ID): TelegramBot

Find a matching bot by token or user id. if id is a NumericalID, think of it as a User.id for finding. Otherwise, it is treated as a token, then converted to a Long and then treated as a User.id.

Link copied to clipboard
open override fun register(configuration: SerializableBotConfiguration): TelegramBot

Register a bot with a serializable configuration SerializableBotConfiguration. The type of configuration must be SerializableTelegramBotConfiguration. There can only be one bot (alive) with the same token.

open fun register(token: String, configuration: TelegramBotConfiguration): TelegramBot
abstract fun register(ticket: Bot.Ticket, configuration: TelegramBotConfiguration): TelegramBot

Register a bot. There can only be one bot (alive) with the same token.

Inherited functions

Link copied to clipboard
open fun all(id: ID): Sequence<Bot>
Link copied to clipboard
open fun allToList(): List<Bot>
open fun allToList(id: ID): List<Bot>
Link copied to clipboard
Link copied to clipboard
abstract fun cancel(cause: Throwable?)
Link copied to clipboard
abstract suspend fun join()
Link copied to clipboard
abstract fun onCompletion(handle: OnCompletion)