few more async events
This commit is contained in:
parent
9efd41c25d
commit
0a5d9e66d6
@ -79,7 +79,7 @@ namespace NadekoBot.Services.Administration
|
|||||||
|
|
||||||
if (muted == null || !muted.Contains(usr.Id))
|
if (muted == null || !muted.Contains(usr.Id))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
Task.Run(() => MuteUser(usr).ConfigureAwait(false));
|
var _ = Task.Run(() => MuteUser(usr).ConfigureAwait(false));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -57,8 +57,11 @@ namespace NadekoBot.Services.Permissions
|
|||||||
|
|
||||||
WordFilteringChannels = new ConcurrentHashSet<ulong>(gcs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId)));
|
WordFilteringChannels = new ConcurrentHashSet<ulong>(gcs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId)));
|
||||||
|
|
||||||
_client.MessageUpdated += (oldData, newMsg, channel)
|
_client.MessageUpdated += (oldData, newMsg, channel) =>
|
||||||
=> FilterInvites((channel as ITextChannel)?.Guild, newMsg as IUserMessage);
|
{
|
||||||
|
var _ = Task.Run(() => FilterInvites((channel as ITextChannel)?.Guild, newMsg as IUserMessage));
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> TryBlockEarly(IGuild guild, IUserMessage msg)
|
public async Task<bool> TryBlockEarly(IGuild guild, IUserMessage msg)
|
||||||
|
@ -120,8 +120,8 @@ namespace NadekoBot.Extensions
|
|||||||
reactionRemoved = delegate { };
|
reactionRemoved = delegate { };
|
||||||
|
|
||||||
var wrap = new ReactionEventWrapper(client, msg);
|
var wrap = new ReactionEventWrapper(client, msg);
|
||||||
wrap.OnReactionAdded += reactionAdded;
|
wrap.OnReactionAdded += (r) => { var _ = Task.Run(() => reactionAdded(r)); };
|
||||||
wrap.OnReactionRemoved += reactionRemoved;
|
wrap.OnReactionRemoved += (r) => { var _ = Task.Run(() => reactionRemoved(r)); };
|
||||||
return wrap;
|
return wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user