runCatchingRest

inline fun <T> runCatchingRest(block: () -> T): RestResult<T>(source)

Deprecated

Moved to the BotCommands-jda-ktx module You can find & replace: Find: io.github.freya022.botcommands.api.core.utils.runCatchingRest Replace: dev.freya02.botcommands.jda.ktx.requests.runCatchingRest

Calls the specified function block and returns its encapsulated result if invocation was successful, catching any Throwable exception that was thrown from the block function execution and encapsulating it as a failure.