コード例 #1
0
 public NerdEventModule(IServiceProvider services, IOptionsMonitor <Config> config)
 {
     _discord        = services.GetRequiredService <DiscordSocketClient>();
     _logger         = services.GetRequiredService <ILoggerService>();
     _discordContext = services.GetRequiredService <IDiscordContextService>();
     _services       = services;
     _config         = config;
 }
コード例 #2
0
 public WarcraftLogsModule(IServiceProvider services, IOptionsMonitor <Config> config)
 {
     _discord             = services.GetRequiredService <DiscordSocketClient>();
     _warcraftLogsService = services.GetRequiredService <IWarcraftLogsService>();
     _logger         = services.GetRequiredService <ILoggerService>();
     _discordContext = services.GetRequiredService <IDiscordContextService>();
     _googleService  = services.GetRequiredService <IGoogleService>();
     _services       = services;
     _config         = config;
 }
コード例 #3
0
        public EventHandlerModule(IServiceProvider services, IOptionsMonitor <Config> config)
        {
            _music            = services.GetRequiredService <IMusicService>();
            _lavaSocketClient = services.GetRequiredService <LavaNode>();
            _discord          = services.GetRequiredService <DiscordSocketClient>();
            _discordContext   = services.GetRequiredService <IDiscordContextService>();
            _googleService    = services.GetRequiredService <IGoogleService>();
            _logger           = services.GetRequiredService <ILoggerService>();
            _services         = services;
            _config           = config;

            InitializeEvents();
        }