public GreetSettingsService(DiscordSocketClient client, NadekoBot bot, DbService db, BotConfigService bss) { _db = db; _client = client; _bss = bss; GuildConfigsCache = new ConcurrentDictionary <ulong, GreetSettings>( bot.AllGuildConfigs .ToDictionary(g => g.GuildId, GreetSettings.Create)); _client.UserJoined += UserJoined; _client.UserLeft += UserLeft; bot.JoinedGuild += Bot_JoinedGuild; _client.LeftGuild += _client_LeftGuild; }
public CommandHandler(DiscordSocketClient client, DbService db, CommandService commandService, BotConfigService bss, NadekoBot bot, IServiceProvider services) { _client = client; _commandService = commandService; _bss = bss; _bot = bot; _db = db; _services = services; _clearUsersOnShortCooldown = new Timer(_ => { UsersOnShortCooldown.Clear(); }, null, GlobalCommandsCooldown, GlobalCommandsCooldown); _prefixes = bot.AllGuildConfigs .Where(x => x.Prefix != null) .ToDictionary(x => x.GuildId, x => x.Prefix) .ToConcurrent(); }
public BotConfigMigrator(DbService dbService, BotConfigService bss) { _db = dbService; _bss = bss; }