libtd-ktx / kotlinx.telegram.core / TelegramFlow / sendFunctionAsync
sendFunctionAsync
suspend fun <reified ExpectedResult :
Object
> sendFunctionAsync(function:
Function
): ExpectedResult
Sends a request to the TDLib and expect a result.
Parameters
function
- TdApi.Function representing a TDLib interface function-class.
ExpectedResult
- result type expecting from given function.
Exceptions
TelegramException.Error
- if TdApi request returns an exception
TelegramException.UnexpectedResult
- if TdApi request returns an unexpected result
TelegramException.ClientNotAttached
- if TdApi client has not attached yet