Fixed compilation warning (no functional change)

This commit is contained in:
Kwoth
2022-08-24 17:31:21 +02:00
parent 623f5ccd5e
commit bed36f8784

View File

@@ -38,19 +38,19 @@ public sealed class NadekoInteraction
await msg.ModifyAsync(m => m.Components = new ComponentBuilder().Build()); 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) if (arg is not SocketMessageComponent smc)
return; return Task.CompletedTask;
if (smc.Message.Id != message.Id) if (smc.Message.Id != message.Id)
return; return Task.CompletedTask;
if (_onlyAuthor && smc.User.Id != _authorId) if (_onlyAuthor && smc.User.Id != _authorId)
return; return Task.CompletedTask;
if (smc.Data.CustomId != _button.CustomId) if (smc.Data.CustomId != _button.CustomId)
return; return Task.CompletedTask;
_ = Task.Run(async () => _ = Task.Run(async () =>
{ {
@@ -64,6 +64,8 @@ public sealed class NadekoInteraction
await smc.DeferAsync(); await smc.DeferAsync();
} }
}); });
return Task.CompletedTask;
} }