Skip to main content
Version: 15.x (API 15) [Current]

Interface ICommandManager

This class manages registered in-game slash commands.

Assembly: Dalamud.dll​
Declaration
public interface ICommandManager : IDalamudService

Properties​

Commands​

Gets a read-only list of all registered commands.

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

Methods​

ProcessCommand(string)​

Process a command in full.

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.

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.

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.

Declaration
bool RemoveHandler(string command)
Returns​

System.Boolean: If the removal was successful.

Parameters​
TypeNameDescription
System.StringcommandThe command to remove.