pagination: make editing generic over a CanEdit interface

This commit is contained in:
Natsu Kagami 2025-02-20 22:54:38 +01:00
parent 5fde2f343a
commit a35563801d
Signed by: nki
GPG key ID: 55A032EB38B49ADB
11 changed files with 233 additions and 207 deletions

View file

@ -689,7 +689,7 @@ pub async fn recent(ctx: &Context, msg: &Message, mut args: Args) -> CommandResu
)
.await?;
style
.display_scores(plays, ctx, reply.guild_id, reply)
.display_scores(plays, ctx, reply.guild_id, (reply, ctx))
.await?;
}
Nth::Nth(nth) => {
@ -762,7 +762,7 @@ pub async fn pins(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
)
.await?;
style
.display_scores(plays, ctx, reply.guild_id, reply)
.display_scores(plays, ctx, reply.guild_id, (reply, ctx))
.await?;
}
Nth::Nth(nth) => {
@ -966,7 +966,7 @@ pub async fn last(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
let reply = msg
.reply(&ctx, format!("Information for {}", content_type))
.await?;
display::display_beatmapset(ctx.clone(), beatmaps, mode, umods, msg.guild_id, reply)
display::display_beatmapset(ctx, beatmaps, mode, umods, msg.guild_id, (reply, ctx))
.await?;
}
}
@ -1018,7 +1018,7 @@ pub async fn check(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul
)
.await?;
style
.display_scores(scores, ctx, msg.guild_id, reply)
.display_scores(scores, ctx, msg.guild_id, (reply, ctx))
.await?;
Ok(())
@ -1130,7 +1130,7 @@ pub async fn top(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
)
.await?;
style
.display_scores(plays, ctx, msg.guild_id, reply)
.display_scores(plays, ctx, msg.guild_id, (reply, ctx))
.await?;
}
}