public LittleBigBot(string configFile = DefaultConfigurationFileLocation) { _configFileLocation = configFile; _services = ConfigureServices(new ServiceCollection()); _client = _services.GetRequiredService <DiscordSocketClient>(); _appConfig = _services.GetRequiredService <IOptions <LittleBigBotConfig> >().Value; _logger = _services.GetRequiredService <ILogger <LittleBigBot> >(); _discordLogger = _services.GetRequiredService <ILoggerFactory>().CreateLogger("Discord"); }
public CommandHandlerService(DiscordSocketClient client, CommandService commandService, IOptions <LittleBigBotConfig> config, IServiceProvider services, ILogger <CommandHandlerService> logger, ILoggerFactory loggerFactory, LittleBigBot bot) { _client = client; _commandService = commandService; _config = config.Value; _services = services; _logger = logger; _commandsTracking = loggerFactory.CreateLogger("CommandsTracking"); _botCore = bot; }