Added error logging to pagination as there seems to be an issue

This commit is contained in:
Kwoth
2022-07-22 16:54:58 +02:00
parent c8c0b27d6a
commit 39fc21d41c

View File

@@ -227,6 +227,8 @@ public static class MessageChannelExtensions
Task OnInteractionAsync(SocketInteraction si)
{
_ = Task.Run(async () =>
{
try
{
if (si is not SocketMessageComponent smc)
return;
@@ -263,6 +265,11 @@ public static class MessageChannelExtensions
await smc.ModifyOriginalResponseAsync(x => x.Embed = toSend.Build());
}
}
}
catch (Exception ex)
{
Log.Error(ex, "Error in pagination: {ErrorMessage}", ex.Message);
}
});
return Task.CompletedTask;