mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 09:10:49 +00:00
osu updatelb
command (#8)
* Make `paginate` take a Paginate trait impl, while `paginate_fn` takes a function * Add `updatelb` command * Implement a member cache * Update member queries to use member cache * Allow everyone to updatelb
This commit is contained in:
parent
b8471152d3
commit
6bf2779d61
11 changed files with 241 additions and 47 deletions
|
@ -33,7 +33,7 @@ async fn list(ctx: &Context, m: &Message, _: Args) -> CommandResult {
|
|||
const ROLES_PER_PAGE: usize = 8;
|
||||
let pages = (roles.len() + ROLES_PER_PAGE - 1) / ROLES_PER_PAGE;
|
||||
|
||||
paginate(
|
||||
paginate_fn(
|
||||
|page, ctx, msg| {
|
||||
let roles = roles.clone();
|
||||
Box::pin(async move {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue