Skip to main content

Registry

Types​

ArgumentFunction​

type ArgumentFunction = (
value: any,
from: Player
) → ...any

ArgumentDefinition​

type ArgumentDefinition = {
type: string,
name: string,
description: string,
optional: boolean?,
permissions: {[string]: boolean}?,
lowerRank: boolean?,
ignoreSelf: boolean?,
shouldRequest: boolean?
}

Properties​

types​

Registry.types: {[string]: ArgumentType}

commands​

Registry.commands: {[string]: CommandDefinition}

commandsList​

Registry.commandsList: {CommandDefinition}

Functions​

makeEnumType​

Registry.makeEnumType(
typeName: string,
enumItems: {EnumItem | string}
) → ()

Makes an Enum argument type definition

suggestCommandAlias​

Registry.suggestCommandAlias(alias: string) → string

Finds the command alias with the lowest Levenshtein distance to the provided alias.

makeSequenceType​

Registry.makeSequenceType(definition: SequenceDefinition?) → ()

Types

​

type SequenceDefinition = {
constructor: (...any) → any,
parse: (...any) → any,
transform: (string) → any,
validate: (any) → boolean,
prefixes: {[string]: string}
}

Makes an sequence argument type definition, useful for Color3, Vector3, etc

registerType​

Registry.registerType(
name: string,
typeObject: Type.ArgumentType,
override: Type.Dict?
) → ()

Types

​

type ArgumentType = {
name: string,
displayName: string?,
listable: boolean?,
filterLog: boolean?,
transform: ArgumentFunction?,
validate: ArgumentFunction,
preParse: ArgumentFunction?,
postParse: ArgumentFunction?,
suggestions: ArgumentFunction?,
prefixes: {[string]: string}?
}

Registers an argument type

registerCommand​

Registry.registerCommand(
_K: any,
commandObject: Type.CommandDefinition
) → ()

Types

​

type CommandDefinition = {
name: string,
aliases: {string}?,
description: string,
group: string,
noLog: boolean?,
permissions: {[string]: boolean}?,
envClient: {} | () → {}?,
env: {} | () → {}?,
runClient: (...any) → ()?,
run: (...any) → ()?
}

Registers a command

registerCommandAlias​

Registry.registerCommandAlias(
_K: any,
alias: string,
command: string
) → ()

Registers a local command alias

registerCommandModule​

Registry.registerCommandModule(
_K: any,
commandModule: ModuleScript
) → ()

Registers a list of commands with the module name as the command group

Show raw api
{
    "functions": [
        {
            "name": "makeEnumType",
            "desc": "Makes an Enum argument type definition",
            "params": [
                {
                    "name": "typeName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "enumItems",
                    "desc": "",
                    "lua_type": "{ EnumItem | string }"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "suggestCommandAlias",
            "desc": "Finds the command alias with the lowest Levenshtein distance to the provided alias.",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 85,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "makeSequenceType",
            "desc": "Makes an sequence argument type definition, useful for Color3, Vector3, etc",
            "params": [
                {
                    "name": "definition",
                    "desc": "",
                    "lua_type": "SequenceDefinition?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 103,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "registerType",
            "desc": "Registers an argument type",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "typeObject",
                    "desc": "",
                    "lua_type": "Type.ArgumentType"
                },
                {
                    "name": "override",
                    "desc": "",
                    "lua_type": "Type.Dict?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 140,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "registerCommand",
            "desc": "Registers a command",
            "params": [
                {
                    "name": "_K",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "commandObject",
                    "desc": "",
                    "lua_type": "Type.CommandDefinition"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 156,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "registerCommandAlias",
            "desc": "Registers a local command alias",
            "params": [
                {
                    "name": "_K",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "command",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 236,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "registerCommandModule",
            "desc": "Registers a list of commands with the module name as the command group",
            "params": [
                {
                    "name": "_K",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "commandModule",
                    "desc": "",
                    "lua_type": "ModuleScript"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 259,
                "path": "src/Shared/Registry.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "types",
            "desc": "",
            "lua_type": "{ [string]: ArgumentType }",
            "source": {
                "line": 10,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "commands",
            "desc": "",
            "lua_type": "{ [string]: CommandDefinition }",
            "source": {
                "line": 13,
                "path": "src/Shared/Registry.luau"
            }
        },
        {
            "name": "commandsList",
            "desc": "",
            "lua_type": "{ CommandDefinition }",
            "source": {
                "line": 16,
                "path": "src/Shared/Registry.luau"
            }
        }
    ],
    "types": [
        {
            "name": "ArgumentFunction",
            "desc": "",
            "lua_type": "(value: any, from: Player) -> ...any",
            "source": {
                "line": 7,
                "path": "src/Shared/Type.luau"
            }
        },
        {
            "name": "ArgumentType",
            "desc": "",
            "lua_type": "{name: string, displayName: string?, listable: boolean?, filterLog: boolean?, transform: ArgumentFunction?, validate: ArgumentFunction, parse: ArgumentFunction, preParse: ArgumentFunction?, postParse: ArgumentFunction?, suggestions: ArgumentFunction?, prefixes: { [string]: string }? }",
            "source": {
                "line": 11,
                "path": "src/Shared/Type.luau"
            }
        },
        {
            "name": "ArgumentDefinition",
            "desc": "",
            "lua_type": "{type: string, name: string, description: string, optional: boolean?, permissions: { [string]: boolean }?, lowerRank: boolean?, ignoreSelf: boolean?, shouldRequest: boolean? }",
            "source": {
                "line": 26,
                "path": "src/Shared/Type.luau"
            }
        },
        {
            "name": "CommandDefinition",
            "desc": "",
            "lua_type": "{name: string, aliases: { string }?, description: string, group: string, noLog: boolean?, args: { ArgumentDefinition }, permissions: { [string]: boolean }?, envClient: {} | () -> {}?, env: {} | () -> {}?, runClient: (...any) -> ()?, run: (...any) -> ()? }",
            "source": {
                "line": 40,
                "path": "src/Shared/Type.luau"
            }
        },
        {
            "name": "SequenceDefinition",
            "desc": "",
            "lua_type": "{ constructor: (...any) -> any, parse: (...any) -> any, transform: (string) -> any, validate: (any) -> boolean, prefixes: { [string]: string } }",
            "source": {
                "line": 44,
                "path": "src/Shared/Registry.luau"
            }
        }
    ],
    "name": "Registry",
    "desc": "",
    "source": {
        "line": 18,
        "path": "src/Shared/Registry.luau"
    }
}