Esempio n. 1
0
 /// <summary>
 /// Initialization of the package; this method is called right after the package is sited, so this is the place
 /// where you can put all the initialization code that rely on services provided by VisualStudio.
 /// </summary>
 protected override void Initialize()
 {
     StackOverflowCommand.Initialize(this);
     GithubCommand.Initialize(this);
     SearchCommand.Initialize(this);
     GenerateNPropertyCommand.Initialize(this);
     base.Initialize();
 }
Esempio n. 2
0
        public ICommand BuildCommand(string command, IUser author, IMessageChannel channel, IGuild guild, params string[] parameters)
        {
            ICommand _command = null;

            switch (command)
            {
            case CommandNames.exit:
                _command = new ExitCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.update:
                _command = new UpdateCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.restart:
                _command = new RestartCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.help:
                _command = new HelpCommand(author, _config, channel, _messageWriter, _commandsInfo, _validationHandler, parameters);
                break;

            case CommandNames.version:
                _command = new VersionCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.random:
                _command = new RandomCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.github:
                _command = new GithubCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.uptime:
                _command = new UptimeCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.color:
                _command = new ColorCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.flipcoin:
                _command = new FlipcoinCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.roll:
                _command = new RollCommand(author, _config, channel, _messageWriter, _validationHandler, parameters);
                break;

            case CommandNames.purge:
                _command = new PurgeCommand(author, _config, channel, _messageWriter, _connectionHandler, _validationHandler, parameters);
                break;

            case CommandNames.summon:
                _command = new SummonCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters);
                break;

            case CommandNames.dismiss:
                _command = new DismissCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters);
                break;

            case CommandNames.play:
                _command = new PlayCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters);
                break;

            default:
                break;
            }
            return(_command);
        }