CommandService
Noir.Services.CommandService: NoirService
A service for easily creating commands with support for command aliases, permissions, etc.
Get a command by the name or alias.
Parameters
query
: string
Returns
NoirCommand|nil
Create a new command.
Parameters
name
: string - The name of the command (eg: if you provided "help", the player would need to type "?help" in chat)aliases
: table<integer, string> - The aliases of the commandrequiredPermissions
: table<integer, string>|nil - The required permissions for this commandrequiresAuth
: boolean|nil - Whether or not this command requires authrequiresAdmin
: boolean|nil - Whether or not this command requires admincapsSensitive
: boolean|nil - Whether or not this command is case-sensitivedescription
: string|nil - The description of this commandcallback
: fun(player: - NoirPlayer, message: string, args: table<integer, string>, hasPermission: boolean)
Returns
NoirCommand
Get a command by the name.
Parameters
name
: string
Returns
NoirCommand|nil
Remove a command.
Parameters
name
: string
Returns all commands.
Returns
table<string, NoirCommand>
Last updated