Pagination is now using buttons instead of reactions

This commit is contained in:
Kwoth
2022-04-28 06:10:06 +02:00
parent 39ae070c9d
commit 35ddd150ba
6 changed files with 68 additions and 180 deletions

View File

@@ -143,27 +143,6 @@ public static class Extensions
public static IEmbedBuilder WithErrorColor(this IEmbedBuilder eb)
=> eb.WithColor(EmbedColor.Error);
public static ReactionEventWrapper OnReaction(
this IUserMessage msg,
DiscordSocketClient client,
Func<SocketReaction, Task> reactionAdded,
Func<SocketReaction, Task>? reactionRemoved = null)
{
if (reactionRemoved is null)
reactionRemoved = _ => Task.CompletedTask;
var wrap = new ReactionEventWrapper(client, msg);
wrap.OnReactionAdded += r =>
{
_ = Task.Run(() => reactionAdded(r));
};
wrap.OnReactionRemoved += r =>
{
_ = Task.Run(() => reactionRemoved(r));
};
return wrap;
}
public static HttpClient AddFakeHeaders(this HttpClient http)
{
AddFakeHeaders(http.DefaultRequestHeaders);