withExecutableScope

inline fun <T> withExecutableScope(executable: OneBotApiExecutable, action: OneBotApiExecutableScope.() -> T): T(source)

在 OneBotApiExecutableScope 的作用域下执行 action。

withExecutableScope(executable) {
api.execute()
}

Since

1.1.0