mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
More tweaks for pagination
This commit is contained in:
parent
155b8d77ba
commit
5db3951d00
1 changed files with 5 additions and 4 deletions
|
@ -204,12 +204,13 @@ pub async fn handle_pagination_reaction(
|
|||
return Ok(page)
|
||||
}
|
||||
ARROW_RIGHT => page + 1,
|
||||
FAST_FORWARD => page + fast,
|
||||
FAST_FORWARD => (pages.unwrap() as u8 - 1).min(page + fast),
|
||||
_ => return Ok(page),
|
||||
};
|
||||
Ok(match pager.render(new_page, ctx, message).await {
|
||||
Err(_) => page,
|
||||
Ok(_) => new_page,
|
||||
Ok(if pager.render(new_page, ctx, message).await? {
|
||||
new_page
|
||||
} else {
|
||||
page
|
||||
})
|
||||
}
|
||||
_ => Ok(page),
|
||||
|
|
Loading…
Add table
Reference in a new issue