public Bot(DiscordSocketClient client, CommandService commands, IConfigurationRoot configuration, IServiceProvider services, IRepository repository, JsonRepository <GypsyModel> gypsyRepository, GypsyContext dbContext, GypsyService gypsyService) { // It is recommended to Dispose of a client when you are finished // using it, at the end of your app's lifetime. _client = client; _commands = commands; _services = services; _repository = repository; _dbContext = dbContext; _gypsyService = gypsyService; _client.Log += LogAsync; _client.Ready += ReadyAsync; _client.MessageReceived += HandleCommandAsync; _discordToken = configuration["discordToken"]; _spawnRate = configuration.GetValue <int>("SpawnRate"); _prefix = configuration.GetValue <string>("Prefix"); _gypsyModels = gypsyRepository.GetAll().Result; }
public CatchModule(GypsyService gypsyService) { this._gypsyService = gypsyService; }