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))
|
||||
return Task.CompletedTask;
|
||||
Task.Run(() => MuteUser(usr).ConfigureAwait(false));
|
||||
var _ = Task.Run(() => MuteUser(usr).ConfigureAwait(false));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -57,8 +57,11 @@ namespace NadekoBot.Services.Permissions
|
||||
|
||||
WordFilteringChannels = new ConcurrentHashSet<ulong>(gcs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId)));
|
||||
|
||||
_client.MessageUpdated += (oldData, newMsg, channel)
|
||||
=> FilterInvites((channel as ITextChannel)?.Guild, newMsg as IUserMessage);
|
||||
_client.MessageUpdated += (oldData, newMsg, channel) =>
|
||||
{
|
||||
var _ = Task.Run(() => FilterInvites((channel as ITextChannel)?.Guild, newMsg as IUserMessage));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> TryBlockEarly(IGuild guild, IUserMessage msg)
|
||||
|
@ -120,8 +120,8 @@ namespace NadekoBot.Extensions
|
||||
reactionRemoved = delegate { };
|
||||
|
||||
var wrap = new ReactionEventWrapper(client, msg);
|
||||
wrap.OnReactionAdded += reactionAdded;
|
||||
wrap.OnReactionRemoved += reactionRemoved;
|
||||
wrap.OnReactionAdded += (r) => { var _ = Task.Run(() => reactionAdded(r)); };
|
||||
wrap.OnReactionRemoved += (r) => { var _ = Task.Run(() => reactionRemoved(r)); };
|
||||
return wrap;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user