Esempio n. 1
0
        public Commands()
        {
            IConfigurationRoot configuration = new ConfigurationBuilder()
                                               .SetBasePath(Directory.GetCurrentDirectory())
                                               .AddJsonFile("appsettings.json", false)
                                               .Build();

            _aesEncryptionKey  = configuration.GetSection("AesEncryptionKey").Value;
            _perudoBotUsername = configuration.GetSection("PerudoBotUsername").Value;

            _db            = new PerudoPlayerBotDbContext();
            _playerService = new PlayerService(Context, _db);
            _gameService   = new GameService(Context, _db);
            _messageParser = new MessageParserService(_aesEncryptionKey);
        }
Esempio n. 2
0
 public PlayerService(SocketCommandContext context, PerudoPlayerBotDbContext db)
 {
     _context = context;
     _db      = db;
 }