Esempio n. 1
0
        public CommandController(Message message, TelegramBotClient botClient)
        {
            Commands = new List <Command>();
            var commands = new CommandsList();

            foreach (var command in commands.GetCommands())
            {
                IsContains(command);
            }
            Save <Command>(Commands);

            foreach (var command in Load <Command>())
            {
                if (command.Contains(message.Text))
                {
                    command.Execute(message, botClient);

                    return;
                }
            }
        }