unsafe

inline suspend fun <T> unsafe(route: Route<T>, block: RequestBuilder<T>.() -> Unit): T(source)

Sends a request to the given route. This function exposes a direct call to the Discord api and allows the user to send a custom RequestBuilder.body.

Unless such functionality is specifically needed, users are advised to use the safer RestService calls.

Parameters

route

The route to which to send a request.

block

The configuration for this request.