fixed .log command not showing

This commit is contained in:
Master Kwoth
2017-10-17 07:03:56 +02:00
parent f155619793
commit 5e267435d4
6 changed files with 55 additions and 21 deletions

View File

@ -16,17 +16,25 @@ namespace NadekoBot.Modules.Permissions
public partial class Permissions
{
[Group]
public class FilterCommands : NadekoSubmodule
public class FilterCommands : NadekoSubmodule<FilterService>
{
private readonly DbService _db;
private readonly FilterService _service;
public FilterCommands(FilterService service, DbService db)
public FilterCommands(DbService db)
{
_service = service;
_db = db;
}
//[NadekoCommand, Usage, Description, Aliases]
//[RequireContext(ContextType.Guild)]
//public async Task SrvrFilterLinks()
//{
// using (var uow = _db.UnitOfWork)
// {
// var config =
// }
//}
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task SrvrFilterInv()

View File

@ -27,6 +27,9 @@ namespace NadekoBot.Modules.Permissions.Services
public ConcurrentHashSet<ulong> WordFilteringChannels { get; }
public ConcurrentHashSet<ulong> WordFilteringServers { get; }
//public ConcurrentHashSet<ulong> LinkFilteringServers { get; }
//public ConcurrentDictionary<ulong, bool> LinkFilteringChannelSettings { get; }
public ConcurrentHashSet<string> FilteredWordsForChannel(ulong channelId, ulong guildId)
{
ConcurrentHashSet<string> words = new ConcurrentHashSet<string>();
@ -56,9 +59,10 @@ namespace NadekoBot.Modules.Permissions.Services
var serverFiltering = bot.AllGuildConfigs.Where(gc => gc.FilterWords);
WordFilteringServers = new ConcurrentHashSet<ulong>(serverFiltering.Select(gc => gc.GuildId));
WordFilteringChannels = new ConcurrentHashSet<ulong>(bot.AllGuildConfigs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId)));
//LinkFilteringServers = new ConcurrentHashSet<ulong>(bot.AllGuildConfigs.Where(gc => gc.FilterLinks).Select(x => x.GuildId));
_client.MessageUpdated += (oldData, newMsg, channel) =>
{
var _ = Task.Run(() =>