Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class EntitiesBuilder(val separator: TextSource? = null)

This builder can be used to provide building of TextSources List

Link copied to clipboard
Link copied to clipboard
typealias FileName = String

File name like hello.jpg

Link copied to clipboard
Link copied to clipboard
open class MatrixBuilder<T>
Link copied to clipboard
expect class MimeType
actual class MimeType
@Serializable(with = MimeTypeSerializer::class)
actual class MimeType : MimeType
actual data class MimeType
actual data class MimeType
actual data class MimeType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
value class RGBColor(val int: Int)
Link copied to clipboard
open class RowBuilder<T>
Link copied to clipboard
class TelegramAPIUrlsKeeper(token: String, hostUrl: String = telegramBotAPIDefaultUrl, urlsSuffixes: String = "", fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" })

Properties

Link copied to clipboard
var DefaultKTgBotAPIKSLog: <Error class: unknown class>

Default realization of KSLog which will be used everywhere where there is no some custom variant of KSLog

Link copied to clipboard

Default tag for DefaultKTgBotAPIKSLog. You may change it and tag will be changed since the near logging

Link copied to clipboard
expect val defaultKtorEngine: <Error class: unknown class><out <Error class: unknown class>>
actual val defaultKtorEngine: <Error class: unknown class><out <Error class: unknown class>>
actual val defaultKtorEngine: <Error class: unknown class><out <Error class: unknown class>>
actual val defaultKtorEngine: <Error class: unknown class><out <Error class: unknown class>>
actual val defaultKtorEngine: <Error class: unknown class><out <Error class: unknown class>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
expect suspend fun <Error class: unknown class>.asInput(): <Error class: unknown class>
actual suspend fun <Error class: unknown class>.asInput(): <Error class: unknown class>
actual suspend fun ByteReadChannel.asInput(): <Error class: unknown class>
actual suspend fun <Error class: unknown class>.asInput(): <Error class: unknown class>
actual suspend fun <Error class: unknown class>.asInput(): <Error class: unknown class>
actual suspend fun <Error class: unknown class>.asInput(): <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard

Version of EntitiesBuilder.blockquote with new line at the end

Version of EntitiesBuilder.blockquote with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard

Version of EntitiesBuilder.bold with new line at the end

Version of EntitiesBuilder.bold with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard

Version of EntitiesBuilder.botCommand with new line at the end

Link copied to clipboard
inline fun buildEntities(separator: TextSource? = null, init: EntitiesBuilderBody): TextSourcesList
inline fun buildEntities(separator: String, init: EntitiesBuilderBody): List<TextSource>

Documentation: DSL text

Link copied to clipboard
Link copied to clipboard

Version of EntitiesBuilder.cashTag with new line at the end

Version of EntitiesBuilder.cashTag with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
fun <T : Throwable> Throwable.causedBy(kclass: KClass<T>, additionalFilterOnHappened: (T) -> T? = { it }): T?
Link copied to clipboard
fun Throwable.causedCancellationException(): CancellationException?

Traverses this throwable's cause chain to find a CancellationException.

Link copied to clipboard
fun Throwable.causedUnresolvedAddressException(): <Error class: unknown class>?
Link copied to clipboard

Version of EntitiesBuilder.code with new line at the end

Link copied to clipboard
actual fun createMimeType(raw: String): MimeType
actual fun createMimeType(raw: String): MimeType
Link copied to clipboard
inline fun EntitiesBuilder.customEmojiln(customEmojiId: CustomEmojiId, vararg parts: TextSource): EntitiesBuilder

Version of EntitiesBuilder.customEmoji with new line at the end

Version of EntitiesBuilder.customEmoji with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
inline fun EntitiesBuilder.dateTimeln(text: String, unixTimeStamp: UnixTimeStamp, dateTimeFormat: String?): EntitiesBuilder

Version of EntitiesBuilder.dateTime with new line at the end

Link copied to clipboard
fun <T> <Error class: unknown class>.decodeDataAndJson(serializer: <Error class: unknown class><T>): <Error class: unknown class><T, <Error class: unknown class>?>
Link copied to clipboard
fun <T> <Error class: unknown class>.deserializeEitherWithRaw(serializer: <Error class: unknown class><T>): <Error class: unknown class><<Error class: unknown class><T?, <Error class: unknown class>>, <Error class: unknown class><T, <Error class: unknown class>?>>
Link copied to clipboard
fun <T> <Error class: unknown class>.deserializeWithRaw(serializer: <Error class: unknown class><T>): <Error class: unknown class><T, <Error class: unknown class>?>
Link copied to clipboard
inline fun EntitiesBuilder.emailln(emailAddress: String): EntitiesBuilder

Version of EntitiesBuilder.email with new line at the end

Version of EntitiesBuilder.email with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
suspend fun <T> firstOf(vararg deferreds: suspend () -> T): T

Executes the given suspend producers in parallel and returns the first successfully produced value.

Link copied to clipboard
suspend fun <T> firstOfOrNull(vararg deferreds: suspend () -> T): T?

Executes the given suspend producers in parallel and returns the first successfully produced value, or null if none of them produce a value.

Link copied to clipboard
fun <T> flatMatrix(vararg elements: T): Matrix<T>
inline fun <T> flatMatrix(block: RowBuilder<T>.() -> Unit): Matrix<T>
Link copied to clipboard

Version of EntitiesBuilder.hashtag with new line at the end

Version of EntitiesBuilder.hashtag with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard

Checks whether this throwable (or any of its causes) is a CancellationException.

Link copied to clipboard
Link copied to clipboard

Version of EntitiesBuilder.italic with new line at the end

Version of EntitiesBuilder.italic with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
fun CoroutineScope.launchWithBotLogger(errorMessageBuilder: CoroutineScope.(Throwable) -> Any = { "Something went wrong" }, context: <Error class: unknown class> = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): <Error class: unknown class>
Link copied to clipboard

Version of EntitiesBuilder.link with new line at the end

Link copied to clipboard
fun <K, V> Map<K, V?>.mapNotNullValues(): Map<K, V>
Link copied to clipboard
fun <K, V> mapOfNotNull(vararg pairs: <Error class: unknown class><K, V?>): Map<K, V>
Link copied to clipboard
fun <Error class: unknown class>.mapWithCommonValues(): Map<String, Any>
Link copied to clipboard
inline fun <T> matrix(block: MatrixBuilder<T>.() -> Unit): Matrix<T>
Link copied to clipboard
Link copied to clipboard
inline fun EntitiesBuilder.mentionln(whoToMention: String): EntitiesBuilder
inline fun EntitiesBuilder.mentionln(userId: UserId, vararg parts: TextSource): <Error class: unknown class>
inline fun EntitiesBuilder.mentionln(user: User, vararg parts: TextSource): EntitiesBuilder

Version of EntitiesBuilder.mention with new line at the end

Version of EntitiesBuilder.mention with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard

Version of EntitiesBuilder.phone with new line at the end

Version of EntitiesBuilder.phone with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
operator fun <T> RowBuilder<T>.plus(t: T): Boolean
Link copied to clipboard
Link copied to clipboard
inline fun EntitiesBuilder.preln(code: String, language: String?): EntitiesBuilder

Version of EntitiesBuilder.pre with new line at the end

Link copied to clipboard
Link copied to clipboard
inline fun <T> row(block: RowBuilder<T>.() -> Unit): List<T>
Link copied to clipboard
fun <T> MatrixBuilder<T>.row(vararg elements: T)
inline fun <T> MatrixBuilder<T>.row(block: RowBuilder<T>.() -> Unit)
Link copied to clipboard
fun SetDefaultKTgBotAPIKSLog(dropCancellationExceptions: Boolean = true, additionalLoggerMapper: <Error class: unknown class>.() -> <Error class: unknown class>? = null)

Setting DefaultKTgBotAPIKSLog with applying of dropCancellationExceptions and additionalFilter to it

Link copied to clipboard

Version of EntitiesBuilder.spoiler with new line at the end

Version of EntitiesBuilder.spoiler with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard

Version of EntitiesBuilder.strikethrough with new line at the end

Version of EntitiesBuilder.strikethrough with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
fun <T> Flow<T>.subscribeWithBotLogger(scope: CoroutineScope, errorMessageBuilder: T.(Throwable) -> Any = { "Something went wrong" }, block: suspend (T) -> Unit): <Error class: unknown class>
Link copied to clipboard
fun <T : Any> T.toJson(serializer: <Error class: unknown class><T>): <Error class: unknown class>
Link copied to clipboard
fun <T : Any> T.toJsonWithoutNulls(serializer: <Error class: unknown class><T>): <Error class: unknown class>
Link copied to clipboard

Trying to convert current PrivateChat to User

Link copied to clipboard

Version of EntitiesBuilder.underline with new line at the end

Version of EntitiesBuilder.underline with new line at the end. Will reuse separator config from buildEntities

Link copied to clipboard
fun <Error class: unknown class>.withoutNulls(): <Error class: unknown class>
fun <Error class: unknown class>.withoutNulls(): <Error class: unknown class>