TelegramBot

interface TelegramBot : Bot(source)

A Telegram Bot of this component.

Author

ForteScarlet

Properties

Link copied to clipboard

An updater for set commands.

Link copied to clipboard
abstract override val component: TelegramComponent
Link copied to clipboard
open override val contactRelation: ContactRelation?
Link copied to clipboard
abstract override val coroutineContext: CoroutineContext
Link copied to clipboard
open override val groupRelation: GroupRelation?
Link copied to clipboard
open override val guildRelation: GuildRelation?
Link copied to clipboard
abstract override val id: ID

The bot token configured.

Link copied to clipboard
open override val name: String

The name (User.username or User.firstName if it is null) of current bot.

Link copied to clipboard
abstract val source: StdlibBot

The source bot.

Link copied to clipboard
open val userId: ID

The id of userInfo.

Link copied to clipboard
abstract val userInfo: User

User info of current bot. The value is updated each time queryUserInfo is used.

Inherited properties

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

Functions

Link copied to clipboard
open suspend fun commands(): TelegramBotCommands
abstract suspend fun commands(scope: BotCommandScope?, languageCode: String?): TelegramBotCommands
Link copied to clipboard
open suspend fun <R : Any> execute(api: TelegramApi<R>): R

Execute TelegramApi by this bot.

Link copied to clipboard
open suspend fun executeRaw(api: TelegramApi<*>): HttpResponse

Execute TelegramApi by this bot.

Link copied to clipboard
open suspend fun <R : Any> executeResult(api: TelegramApi<R>): TelegramApiResult<R>

Execute TelegramApi by this bot.

Link copied to clipboard
open suspend fun pushUpdate(update: Update, raw: String? = null)
Link copied to clipboard
abstract suspend fun queryUserInfo(): User

Query user info of the current bot. And update the value of userInfo.

Inherited functions

Link copied to clipboard
open fun cancel()
abstract fun cancel(reason: Throwable?)
Link copied to clipboard
abstract infix fun isMe(id: ID): Boolean
Link copied to clipboard
abstract suspend fun join()
Link copied to clipboard
open suspend fun messageFromId(id: ID): MessageContent
Link copied to clipboard
Link copied to clipboard
abstract fun onCompletion(handle: OnCompletion)
Link copied to clipboard
abstract suspend fun start()
Link copied to clipboard