public MusicHandler(LavaRestClient lavaRestClient, LavaSocketClient lavaSocketClient, DiscordSocketClient client, IDiscordLogger logger) { _lavaRestClient = lavaRestClient ?? throw new ArgumentNullException(nameof(lavaRestClient)); _lavaSocketClient = lavaSocketClient ?? throw new ArgumentNullException(nameof(lavaSocketClient)); _client = client ?? throw new ArgumentNullException(nameof(client)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public StatsManager(HttpClient httpClient) { _httpClient = httpClient; _logger = DicordLogFactory.GetLogger <StatsManager>(GlobalVariables.DiscordId, GlobalVariables.DiscordToken); WebHookClient.RateLimitMs = 1000; }
public Connection(DiscordSocketClient client, ICommandHandler handler, IDiscordLogger logger, IRepeater repeater) { _client = client ?? throw new ArgumentNullException(nameof(client)); _handler = handler ?? throw new ArgumentNullException(nameof(handler)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _repeater = repeater ?? throw new ArgumentNullException(nameof(repeater)); }
public StartupService(IConfigurationRoot config, IStellarService stellarService) { //DatabaseQueueService databaseQueueService _config = config; _stellarService = stellarService; _logger = DicordLogFactory.GetLogger <StartupService>(GlobalVariables.DiscordId, GlobalVariables.DiscordToken); }
static Startup() { ILoggerRepository logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("Kin.Horizon.Api.Poller.dll.config")); Logger = DicordLogFactory.GetLogger <Startup>(GlobalVariables.DiscordId, GlobalVariables.DiscordToken); }
public CommandHandler(DiscordSocketClient client, CommandService service, IDiscordLogger logger, IServiceProvider provider, IPointsService points, IGuildHandler guild) { _client = client ?? throw new ArgumentNullException(nameof(client)); _service = service ?? throw new ArgumentNullException(nameof(service)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _provider = provider ?? throw new ArgumentNullException(nameof(provider)); _points = points ?? throw new ArgumentNullException(nameof(points)); _guild = guild ?? throw new ArgumentNullException(nameof(guild)); _service.AddModulesAsync(typeof(HelpService).Assembly, provider); }
public Connection(DiscordShardedClient client, IDiscordLogger discordLogger, ILogger logger, ICommandHandler commandHandler, IExpHandler expHandler, EventMessageHandler eventMsgHandler, IUserLeftHandler userLeftHandler) { _client = client; _discordLogger = discordLogger; _logger = logger; _commandHandler = commandHandler; _expHandler = expHandler; _eventMsgHandler = eventMsgHandler; _userLeftHandler = userLeftHandler; }
public BotStartup(IDiscordLogger genericDiscordDiscordLogger, ILogger <BotStartup> logger, CommandService commandService, IServiceProvider serviceProvider, IHostApplicationLifetime applicationLifetime, DiscordSocketClient client, GeneralOptions options) { _discordLogger = genericDiscordDiscordLogger; _logger = logger; _commandService = commandService; _serviceProvider = serviceProvider; _applicationLifetime = applicationLifetime; _client = client; _options = options; }
public StellarService(IConfigurationRoot config, HttpClient httpClient, StatsManager statsManager) { _statsManager = statsManager; _config = config; _queueNotifier1 = new AutoResetEvent(false); _httpClient = httpClient; _logger = DicordLogFactory.GetLogger <StellarService>(GlobalVariables.DiscordId, GlobalVariables.DiscordToken); _operationsToHandleQueue = new ConcurrentQueue <OperationResponse>(); ServicePointManager.DefaultConnectionLimit = 100; _logger.LogInformation($"Stellar service is using endpoint {_config["StellarService:HorizonHostname"]}"); _server = new Server(_config["StellarService:HorizonHostname"]); Network.UsePublicNetwork(); _startTime = new Stopwatch(); var queueThread = new Task(HandleResponseQueue, TaskCreationOptions.LongRunning); queueThread.Start(); _timer = new System.Timers.Timer(50); _timer.Elapsed += Timer_tick; _timer.Enabled = true; _timer.Start(); }
public DiscordConnection(IClientManager clientManager, ICommandHandler commandHandler, IDiscordLogger discordLogger) { this.clientManager = clientManager; this.commandHandler = commandHandler; this.discordLogger = discordLogger; }