public BanTracking(DiscordGuilds g, BanDataStructure savedDS) { _guilds = g; statsdb = new StatsDB(); BanTreeAccess = new SemaphoreSlim(1, 1); bds = savedDS; Console.WriteLine($"Loaded {bds.BanDict.Count} ban dict elements from the last backup"); }
public BanTracking(DiscordGuilds g) { Console.WriteLine("Creating bantracking without any previous data."); _guilds = g; statsdb = new StatsDB(); BanTreeAccess = new SemaphoreSlim(1, 1); bds = new BanDataStructure(); }
private Dictionary <ulong, RoleHighlighting> individualHLs; // An individual highlighter for each guild, indexed by the guild ID. /// <summary> /// A constructor that may only be called once the connection with the Discord API is made and we can pass the full list /// of all Discord guilds. /// </summary> /// <param name="allGuilds"></param> public MainHighlighter(DiscordGuilds allGuilds) { individualHLs = new Dictionary <ulong, RoleHighlighting>(); _guilds = allGuilds; foreach ((var guildID, var guild) in _guilds.byID) { RoleHighlighting singleHL = new RoleHighlighting(guild); individualHLs.Add(guildID, singleHL); } fullInit = true; }