AceConsole-3.0

From WowAce Wiki

Jump to: navigation, search

Contents

API

:Print([chatframe,] ...)

chatframe (frame) 
OPTIONAL Frame with .AddMessage defined to output to

Calls tostring() on all arguments passed and outputs the result to DEFAULT_CHAT_FRAME or the chatframe passed

:RegisterChatCommand(command, func[, persist, silent])

command (string) 
chat command to be registered WITHOUT the leading "/"
func (function or string) 
function to call, or self[func](self, ...) call
persist (boolean) 
If false or nil, the command will be soft disabled/enabled when AceConsole-3.0 is used as a mixin (default: true)
silent (boolean) 
OPTIONAL If true and the command already exists, an error will not be asserted.

Returns true if successful, false otherwise.

:UnregisterChatCommand(command)

command (string) 
chat command to be unregistered WITHOUT the leading "/"

Unregisters the chat command.

:IterateChatCommands()

Returns an iterator over all registered commands.

:GetArgs(string, numargs, startpos)

string (string) 
The raw argument string
numargs (number) 
How man arguments to get (default 1)
startpos (number) 
Where in the string to start scanning (default 1)

Retrieves one or more space-separated arguments from a string. It treats quoted strings and itemlinks as non-spaced.

Personal tools
Support the Site