Skip to main content

Interface ICommandManager

This class manages registered in-game slash commands.

Assembly: Dalamud.dll
View Source
Declaration
public interface ICommandManager

Properties

Commands

Gets a read-only list of all registered commands.

View Source
Declaration
ReadOnlyDictionary<string, IReadOnlyCommandInfo> Commands { get; }

Methods

ProcessCommand(string)

Process a command in full.

View Source
Declaration
bool ProcessCommand(string content)
Returns

System.Boolean: True if the command was found and dispatched.

Parameters
TypeNameDescription
System.StringcontentThe full command string.

DispatchCommand(string, string, IReadOnlyCommandInfo)

Dispatch the handling of a command.

View Source
Declaration
void DispatchCommand(string command, string argument, IReadOnlyCommandInfo info)
Parameters
TypeNameDescription
System.StringcommandThe command to dispatch.
System.StringargumentThe provided arguments.
Dalamud.Game.Command.IReadOnlyCommandInfoinfoA Dalamud.Game.Command.CommandInfo object describing this command.

AddHandler(string, CommandInfo)

Add a command handler, which you can use to add your own custom commands to the in-game chat.

View Source
Declaration
bool AddHandler(string command, CommandInfo info)
Returns

System.Boolean: If adding was successful.

Parameters
TypeNameDescription
System.StringcommandThe command to register.
Dalamud.Game.Command.CommandInfoinfoA Dalamud.Game.Command.CommandInfo object describing the command.

RemoveHandler(string)

Remove a command from the command handlers.

View Source
Declaration
bool RemoveHandler(string command)
Returns

System.Boolean: If the removal was successful.

Parameters
TypeNameDescription
System.StringcommandThe command to remove.