From bed36f87843111f8b89fe87620d8613353bdebb3 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 24 Aug 2022 17:31:21 +0200 Subject: [PATCH] Fixed compilation warning (no functional change) --- .../Common/Interaction/NadekoInteraction.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/NadekoBot/Common/Interaction/NadekoInteraction.cs b/src/NadekoBot/Common/Interaction/NadekoInteraction.cs index 0a005fd59..83bfe1717 100644 --- a/src/NadekoBot/Common/Interaction/NadekoInteraction.cs +++ b/src/NadekoBot/Common/Interaction/NadekoInteraction.cs @@ -38,19 +38,19 @@ public sealed class NadekoInteraction await msg.ModifyAsync(m => m.Components = new ComponentBuilder().Build()); } - private async Task OnInteraction(SocketInteraction arg) + private Task OnInteraction(SocketInteraction arg) { if (arg is not SocketMessageComponent smc) - return; + return Task.CompletedTask; if (smc.Message.Id != message.Id) - return; + return Task.CompletedTask; if (_onlyAuthor && smc.User.Id != _authorId) - return; + return Task.CompletedTask; if (smc.Data.CustomId != _button.CustomId) - return; + return Task.CompletedTask; _ = Task.Run(async () => { @@ -64,6 +64,8 @@ public sealed class NadekoInteraction await smc.DeferAsync(); } }); + + return Task.CompletedTask; }