fixed sfi and sfw not ignoring server admin when message is edited. #1444
This commit is contained in:
parent
1358878773
commit
10fdd36e87
@ -61,12 +61,15 @@ namespace NadekoBot.Modules.Permissions.Services
|
|||||||
|
|
||||||
_client.MessageUpdated += (oldData, newMsg, channel) =>
|
_client.MessageUpdated += (oldData, newMsg, channel) =>
|
||||||
{
|
{
|
||||||
var _ = Task.Run(async () =>
|
var _ = Task.Run(() =>
|
||||||
{
|
{
|
||||||
var guild = (channel as ITextChannel)?.Guild;
|
var guild = (channel as ITextChannel)?.Guild;
|
||||||
var usrMsg = newMsg as IUserMessage;
|
var usrMsg = newMsg as IUserMessage;
|
||||||
|
|
||||||
return (await FilterInvites(guild, usrMsg)) || (await FilterWords(guild, usrMsg));
|
if (guild == null || usrMsg == null)
|
||||||
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
return TryBlockEarly(guild, usrMsg);
|
||||||
});
|
});
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
};
|
};
|
||||||
@ -116,9 +119,9 @@ namespace NadekoBot.Modules.Permissions.Services
|
|||||||
if (usrMsg is null)
|
if (usrMsg is null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((InviteFilteringChannels.Contains(usrMsg.Channel.Id) ||
|
if ((InviteFilteringChannels.Contains(usrMsg.Channel.Id)
|
||||||
InviteFilteringServers.Contains(guild.Id)) &&
|
|| InviteFilteringServers.Contains(guild.Id))
|
||||||
usrMsg.Content.IsDiscordInvite())
|
&& usrMsg.Content.IsDiscordInvite())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user