# com.github.insanusmokrassar.TelegramBotAPI.utils.extensions - docs

docs / com.github.insanusmokrassar.TelegramBotAPI.utils.extensions

## Package com.github.insanusmokrassar.TelegramBotAPI.utils.extensions

### Types

(common)

#### AccumulatedValues

`typealias AccumulatedValues<K, V> = Pair<K, List<V>>`

### Extensions for External Classes

(jvm)

#### com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor

(common)

#### kotlin.String

(common)

#### kotlinx.coroutines.channels.ReceiveChannel

### Functions

(jvm)

#### asReference

`fun <T> T.asReference(): WeakReference<T>`

(common)

#### executeAsync

`fun <T : Any> RequestsExecutor.executeAsync(request: Request<T>, onFail: (suspend (Response) -> Unit)? = null, scope: CoroutineScope = GlobalScope, onSuccess: (suspend (T) -> Unit)? = null): Job`
`fun <T : Any> RequestsExecutor.executeAsync(request: Request<T>, scope: CoroutineScope = GlobalScope): Deferred<T>`

(common)

#### executeUnsafe

`suspend fun <T : Any> RequestsExecutor.executeUnsafe(request: Request<T>, retries: Int = 0, retriesDelay: Long = 1000L): T?`