Words should get filtered in edited messages too.

This commit is contained in:
Master Kwoth 2017-07-14 18:39:21 +02:00
parent 1c72d2864a
commit f239c46e20

View File

@ -59,7 +59,13 @@ namespace NadekoBot.Services.Permissions
_client.MessageUpdated += (oldData, newMsg, channel) => _client.MessageUpdated += (oldData, newMsg, channel) =>
{ {
var _ = Task.Run(() => FilterInvites((channel as ITextChannel)?.Guild, newMsg as IUserMessage)); var _ = Task.Run(async () =>
{
var guild = (channel as ITextChannel)?.Guild;
var usrMsg = newMsg as IUserMessage;
return (await FilterInvites(guild, usrMsg)) || (await FilterWords(guild, usrMsg));
});
return Task.CompletedTask; return Task.CompletedTask;
}; };
} }