Skip to main content

Registry

Types

ArgumentFunction

type ArgumentFunction = (
valueany,
fromPlayer
) → ...any

ArgumentDefinition

type ArgumentDefinition = {
typestring,
namestring,
descriptionstring,
optionalboolean?,
lowerRankboolean?,
ignoreSelfboolean?,
shouldRequestboolean?
}

Properties

types

Registry.types: {[string]ArgumentType}

commands

Registry.commands: {[string]CommandDefinition}

commandsList

Registry.commandsList: {CommandDefinition}

Functions

makeEnumType

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

Makes an Enum command type definition

registerType

Registry.registerType(
namestring,
typeObjectArgumentType,
overrideDict?
) → ()

Types

type ArgumentType = {
namestring,
displayNamestring?,
listableboolean?,
transformArgumentFunction?,
validateArgumentFunction,
preParseArgumentFunction?,
postParseArgumentFunction?,
suggestionsArgumentFunction?,
prefixes{[string]string}?
}

Registers a command type

registerCommand

Registry.registerCommand(
_Kany,
commandObjectCommandDefinition
) → ()

Types

type CommandDefinition = {
namestring,
aliases{string}?,
descriptionstring,
groupstring,
envClient{} | () → {}?,
env{} | () → {}?,
runClient(...any) → ()?,
run(...any) → ()?
}

Registers a command

registerCommandAlias

Registry.registerCommandAlias(
_Kany,
aliasstring,
commandstring
) → ()

Registers a local command alias

registerCommandModule

Registry.registerCommandModule(
_Kany,
commandModuleModuleScript
) → ()

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

Show raw api
{
    "functions": [
        {
            "name": "makeEnumType",
            "desc": "Makes an Enum command type definition",
            "params": [
                {
                    "name": "typeName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "enumItems",
                    "desc": "",
                    "lua_type": "{ EnumItem | string }"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 73,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "registerType",
            "desc": "Registers a command type",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "typeObject",
                    "desc": "",
                    "lua_type": "ArgumentType"
                },
                {
                    "name": "override",
                    "desc": "",
                    "lua_type": "Dict?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 93,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "registerCommand",
            "desc": "Registers a command",
            "params": [
                {
                    "name": "_K",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "commandObject",
                    "desc": "",
                    "lua_type": "CommandDefinition"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 109,
                "path": "MainModule/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": 161,
                "path": "MainModule/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": 184,
                "path": "MainModule/Registry.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "types",
            "desc": "",
            "lua_type": "{ [string]: ArgumentType }",
            "source": {
                "line": 58,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "commands",
            "desc": "",
            "lua_type": "{ [string]: CommandDefinition }",
            "source": {
                "line": 61,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "commandsList",
            "desc": "",
            "lua_type": "{ CommandDefinition }",
            "source": {
                "line": 64,
                "path": "MainModule/Registry.luau"
            }
        }
    ],
    "types": [
        {
            "name": "ArgumentFunction",
            "desc": "",
            "lua_type": "(value: any, from: Player) -> ...any",
            "source": {
                "line": 12,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "ArgumentType",
            "desc": "",
            "lua_type": "{name: string, displayName: string?, listable: boolean?, transform: ArgumentFunction?, validate: ArgumentFunction, parse: ArgumentFunction, preParse: ArgumentFunction?, postParse: ArgumentFunction?, suggestions: ArgumentFunction?, prefixes: { [string]: string }? }",
            "source": {
                "line": 16,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "ArgumentDefinition",
            "desc": "",
            "lua_type": "{type: string, name: string, description: string, optional: boolean?, lowerRank: boolean?, ignoreSelf: boolean?, shouldRequest: boolean? }",
            "source": {
                "line": 31,
                "path": "MainModule/Registry.luau"
            }
        },
        {
            "name": "CommandDefinition",
            "desc": "",
            "lua_type": "{name: string, aliases: { string }?, description: string, group: string, args: { ArgumentDefinition }, envClient: {} | () -> {}?, env: {} | () -> {}?, runClient: (...any) -> ()?, run: (...any) -> ()? }",
            "source": {
                "line": 44,
                "path": "MainModule/Registry.luau"
            }
        }
    ],
    "name": "Registry",
    "desc": "",
    "source": {
        "line": 66,
        "path": "MainModule/Registry.luau"
    }
}