command - Windower/packages GitHub Wiki

This library handles command registration for use from within the FFXI chat log or the Windower console.

local command = require('core.command')

✔️ Dependency Not Required

This library does not require an explicit dependency in the manifest.xml file for your package.

Tables

The command table has the following entries:


command.input

Inputs the given command to FFXI's internal command handler.

Definition

function command.input(command : string, source : command_source = 'user')

Parameters

command string

The string to input.

source command_source [default: user]

Indicates the source of the command.

Return

This function does not return any values.



command.new

Creates a new command object, which can then be used to register functions to execute based on given sub-commands.

Definition

function command.new(name : string) : command_object

Parameters

name string

The name of the command. Will be used as the command prefix when entering commands, e.g. when using test as the name, the command can be triggered by typing /test ... into the console or chat log.

Return

command_object command_object

The command object associated with the specified name. Can be used to register functions to specific commands.



command.delete

Deletes a previously created command, removing all its registered sub-commands and their handlers.

function command.delete(command_object : command_object)

Parameters

command_object command_object

The command object which was previously returned by command.new.

Return

This function does not return any values.

⚠️ **GitHub.com Fallback** ⚠️