Skip to content

Utilities

Interface for the discord-luau Utilities package

Properties

The Utilities instance has no set properties!

Methods

The Utilities instance has no set methods!

Functions

Utilities.createGuild

Utilities . Utilities.createGuild ()  -> ()

Generates a random Guid (v4) that we can use to apply a unique identifier to objects.

Utilities.validateKebabCase

Utilities . Utilities.validateKebabCase ()  -> ()

Will validate a string to ensure that it’s kebab-case, discord is sometimes very specific about the casing of text.

Will return either true/false, will not error.

Utilities.coroutineRun

Utilities . Utilities.coroutineRun ()  -> ()

Creates a thread, resumes that thread - and handles errors if this resumed thread fails.

Will return the thread spawned.

Utilities.tableReflect

Utilities . Utilities.tableReflect ()  -> ()

Will swap the K, V’s, as well as keep the original K, Vs, for example:

local a = { a = 1, b = 2, c = 3 }
tableReflect(a)
--[[
a = {
-- default values
a = 1,
b = 2,
c = 3,
-- reflected values
[1] = "a",
[2] = "b",
[3] = "c"
}
]]