Skip to content

Runtime

Runtime . getRuntime ( )  -> RuntimeValue

Will return the Runtime that this code is being executed under.

Returns

RuntimeValue
Runtime . assertRuntime ( )  -> RuntimeValue

Will error out if the current Runtime is not supported by Discord-Luau

Returns

RuntimeValue
Runtime . capabilities ( )  -> Capabilities

Returns a table describing which optional capabilities are available on the current runtime. Use this to guard features that are not universally supported before attempting to load them.

local caps = stdPolyfills.runtime.capabilities()
if not caps.ffi then
-- skip FFI-dependent setup
end

Returns

Capabilities