61 string text = message.
Text.ToLower();
63 if (!text.StartsWith(value))
67 if (text.Length == value.Length)
71 return text[value.Length] ==
' ';
101 _commands[value].ProcessOutgoingMessage(message);
125 value.ProcessIncomingMessage(message.
Text, (
byte)
clientId);
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
readonly Dictionary< ChatCommandId, IChatCommand > _commands
ChatCommandProcessor AddCommand< T >()
ChatCommandProcessor AddDefaultCommand< T >()
static string RemoveCommandPrefix(string messageText, LocalizedText command)
void AddAlias(LocalizedText text, NetworkText result)
ChatMessage CreateOutgoingMessage(string text)
IChatCommand _defaultCommand
readonly Dictionary< LocalizedText, ChatCommandId > _localizedCommands
readonly Dictionary< LocalizedText, NetworkText > _aliases
static bool HasLocalizedCommand(ChatMessage message, LocalizedText command)
void ProcessIncomingMessage(ChatMessage message, int clientId)
void SetCommand(ChatCommandId commandId)
static LocalizedText[] FindAll(Regex regex)
static LocalizedText GetText(string key)
static bool Exists(string key)
void ProcessIncomingMessage(string text, byte clientId)