Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class LoggingWrapper(cfg: LoggingConfiguration, tag: String = DEFAULT_LOGGING_TAG)
Link copied to clipboard
Link copied to clipboard
typealias OnInputActivity = suspend ActivityCtx<ProcessedUpdate>.() -> Unit
Link copied to clipboard
typealias RetryStrategy = HttpRetryShouldRetryContext.(HttpRequest, HttpResponse) -> Boolean
Link copied to clipboard
open class TgException(val message: String? = null, val cause: Throwable? = null) : RuntimeException
Link copied to clipboard
class TgFailureException(val response: String) : TgException
Link copied to clipboard
typealias WhenNotHandledActivity = suspend ProcessedUpdate.() -> Unit

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect val KClass<*>.fqName: String
actual val KClass<*>.fqName: String
actual val KClass<*>.fqName: String
actual val KClass<*>.fqName: String

Functions

Link copied to clipboard

Function to check is web app data is safe.

Link copied to clipboard
fun defaultArgParser(text: String, parameterDelimiter: Char, valueDelimiter: Char): Map<String, String>
defineActivities
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> ClassManager.getInstance(vararg initParams: Any?): T?

fun <T : Any> TelegramBot.getInstance(kClass: KClass<T>, vararg initParams: Any?): T

Method to get given class instance through defined ClassManager.

Link copied to clipboard
fun <T> Collection<T>.joinToInlineKeyboard(nameSelector: T.() -> String, callbackSelector: T.() -> String, paginationCallbackPattern: String, currentPage: Int = 1, perPage: Int = 5, perLine: Int = 1): InlineKeyboardMarkup

Helper function to paginate over a collection.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Action that is performed on the presence of eu.vendeli.tgbot.types.Update.message in the eu.vendeli.tgbot.types.Update.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Action that is performed on the presence of eu.vendeli.tgbot.types.Update.poll in the eu.vendeli.tgbot.types.Update.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun TgUpdateHandler.runExceptionHandler(dispatcher: CoroutineDispatcher = PROCESSING_DISPATCHER, delay: Long = 100, block: ExceptionHandler): Job

Runs exception handler loop.

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

Set chain for input listening.

Link copied to clipboard
fun ByteArray.toImplicitFile(fileName: String = DEFAULT_FILENAME, contentType: String = getContentType()): ImplicitFile.InpFile
fun File.toImplicitFile(fileName: String = DEFAULT_FILENAME, contentType: String = URLConnection.guessContentTypeFromName(name) ?: DEFAULT_CONTENT_TYPE): ImplicitFile.InpFile
Link copied to clipboard
fun ByteArray.toInputFile(fileName: String = DEFAULT_FILENAME, contentType: String = getContentType()): InputFile
fun File.toInputFile(fileName: String = name.ifEmpty { DEFAULT_FILENAME }, contentType: String? = null): InputFile