Cleanup, .clparew can now be ran everyone, modules load appropriate guild configs, IEnumerable<GuildConfig> replaces with NadekoBot.AllGuildConfigs

This commit is contained in:
Master Kwoth
2017-10-13 02:21:39 +02:00
parent db6fa9af1a
commit e32446335e
40 changed files with 336 additions and 180 deletions

View File

@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration.Services
private readonly DbService _db;
private readonly Logger _log;
public VplusTService(DiscordSocketClient client, IEnumerable<GuildConfig> gcs, NadekoStrings strings,
public VplusTService(DiscordSocketClient client, NadekoBot bot, NadekoStrings strings,
DbService db)
{
_client = client;
@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Administration.Services
_db = db;
_log = LogManager.GetCurrentClassLogger();
VoicePlusTextCache = new ConcurrentHashSet<ulong>(gcs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId));
VoicePlusTextCache = new ConcurrentHashSet<ulong>(bot.AllGuildConfigs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId));
_client.UserVoiceStateUpdated += UserUpdatedEventHandler;
}