public SchedulingService(PmConfig config, PmDiscordClient client, LoggingService log, GameService games) { this.client = client; this.log = log; this.games = games; scheduledRestart = config.scheduledRestart; }
public PmCommandService(IServiceProvider services, PmConfig config, PmDiscordClient client, LoggingService log, StorageService storage) : base(CommandConfig) { this.services = services; this.client = client; this.log = log; this.storage = storage; CommandExecuted += OnCommandExecuted; }
public InputService(PmConfig config, PmDiscordClient client, LoggingService log, StorageService storage, PmCommandService commands, GameService games) { this.client = client; this.commands = commands; this.storage = storage; this.log = log; this.games = games; bannedChannels = config.bannedChannels; pendingResponses = new ConcurrentDictionary <PendingResponse, byte>(); }
public StorageService(PmConfig config, PmDiscordClient client, LoggingService log) { this.client = client; this.log = log; DefaultPrefix = config.defaultPrefix; dbConnection = config.dbConnectionString; cachedPrefixes = new ConcurrentDictionary <ulong, string>(); cachedAllowsAutoresponse = new ConcurrentDictionary <ulong, bool>(); cachedNeedsPrefix = new ConcurrentDictionary <ulong, bool>(); using (var db = MakeDbContext()) { db.Database.EnsureCreated(); log.Info("Database ready", LogSource.Storage); } }