diff --git a/src/NadekoBot/Services/Administration/MuteService.cs b/src/NadekoBot/Services/Administration/MuteService.cs index 01b29d34..7ed9062a 100644 --- a/src/NadekoBot/Services/Administration/MuteService.cs +++ b/src/NadekoBot/Services/Administration/MuteService.cs @@ -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) { diff --git a/src/NadekoBot/Services/Permissions/FilterService.cs b/src/NadekoBot/Services/Permissions/FilterService.cs index 0fced623..69d54cde 100644 --- a/src/NadekoBot/Services/Permissions/FilterService.cs +++ b/src/NadekoBot/Services/Permissions/FilterService.cs @@ -57,8 +57,11 @@ namespace NadekoBot.Services.Permissions WordFilteringChannels = new ConcurrentHashSet(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 TryBlockEarly(IGuild guild, IUserMessage msg) diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index d0eba8dd..7ed4f270 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -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; }