mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 09:10:49 +00:00
pagination: Directly pass list of interactions to render
This commit is contained in:
parent
8c5135bfc9
commit
5fde2f343a
7 changed files with 59 additions and 47 deletions
|
@ -222,9 +222,7 @@ pub async fn ranks(ctx: &Context, m: &Message) -> CommandResult {
|
|||
))
|
||||
.build();
|
||||
|
||||
Ok(Some(
|
||||
EditMessage::new().content(content).components(vec![btns]),
|
||||
))
|
||||
Ok(Some(EditMessage::new().content(content).components(btns)))
|
||||
})
|
||||
})
|
||||
.with_page_count(total_pages),
|
||||
|
@ -390,9 +388,7 @@ pub(crate) async fn contest_rank_table(
|
|||
.push_line(format!("Page **{}/{}**", page + 1, total_pages))
|
||||
.build();
|
||||
|
||||
Ok(Some(
|
||||
EditMessage::new().content(content).components(vec![btns]),
|
||||
))
|
||||
Ok(Some(EditMessage::new().content(content).components(btns)))
|
||||
})
|
||||
})
|
||||
.with_page_count(total_pages),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue