mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-20 09:18:54 +00:00
Implement len for beatmapset paging
This commit is contained in:
parent
f9d35954da
commit
155b8d77ba
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
pub use beatmapset::display_beatmapset;
|
pub use beatmapset::display_beatmapset;
|
||||||
|
|
||||||
|
// mod scores {
|
||||||
|
// }
|
||||||
|
|
||||||
mod beatmapset {
|
mod beatmapset {
|
||||||
use crate::{
|
use crate::{
|
||||||
discord::{
|
discord::{
|
||||||
|
@ -71,6 +74,10 @@ mod beatmapset {
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl pagination::Paginate for Paginate {
|
impl pagination::Paginate for Paginate {
|
||||||
|
fn len(&self) -> Option<usize> {
|
||||||
|
Some(self.maps.len())
|
||||||
|
}
|
||||||
|
|
||||||
async fn render(
|
async fn render(
|
||||||
&mut self,
|
&mut self,
|
||||||
page: u8,
|
page: u8,
|
||||||
|
|
Loading…
Add table
Reference in a new issue