Ejemplo n.º 1
0
        public static void CheckForCommand(object sender, OnChatCommandReceivedArgs e)
        {
            var commandText = e.Command.CommandText;

            var commandSettings = _commandSettings.Find(c => c.Name == commandText);

            if (commandSettings == null)
            {
                return;
            }
            if (!commandSettings.IsActive)
            {
                CommandUtility.GetCommandByKey("LogError")(_client, _twitchService, e.Command, commandSettings);
            }

            CommandUtility.GetCommandByKey(commandSettings.Identifier)(_client, _twitchService, e.Command, commandSettings);
        }