Exemplo n.º 1
0
        public CommandHandler(DiscordSocketClient client,
                              CommandService commands,
                              IConfigurationRoot config,
                              IServiceProvider provider,
                              IDataAccess data,
                              LoggingService logger,
                              BotActions actions,
                              QuotesService quotes)
        {
            _client   = client;
            _commands = commands;
            _config   = config;
            _provider = provider;
            _data     = data;
            _logger   = logger;
            _actions  = actions;
            _quotes   = quotes;

            _client.MessageReceived       += OnMessageReceivedAsync;
            _client.UserJoined            += OnUserJoined;
            _client.ReactionAdded         += OnReactionAdded;
            _client.ReactionRemoved       += OnReactionRemoved;
            _client.UserVoiceStateUpdated += OnUserVoiceStateUpdated;
            _client.Connected             += OnClientConnected;
        }
Exemplo n.º 2
0
 public AdminModule(IDataAccess data,
                    LoggingService logger,
                    BotActions actions)
 {
     _data    = data;
     _logger  = logger;
     _actions = actions;
 }
Exemplo n.º 3
0
 public PuzzleModule(IDataAccess data,
                     BotActions actions,
                     QuotesService quotes)
 {
     _data    = data;
     _actions = actions;
     _quotes  = quotes;
 }
Exemplo n.º 4
0
        private void UpdatePuzzlesPoints(IEnumerable <PuzzleModel> puzzles, int modifier = 0)
        {
            foreach (var puzzle in puzzles)
            {
                var puzzleInfo = _data.GetPuzzleInfo(puzzle.Code);
                puzzle.Points = BotActions.CalculatePuzzlePoints(puzzleInfo.Count + modifier);

                _data.AddOrUpdatePuzzle(puzzle);
            }
        }
Exemplo n.º 5
0
 public DebugModule(IDataAccess data,
                    BotActions actions)
 {
     _data    = data;
     _actions = actions;
 }
Exemplo n.º 6
0
 public GeneralModule(BotActions actions)
 {
     _actions = actions;
 }