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:
Natsu Kagami 2020-11-23 02:26:18 -05:00 committed by GitHub
parent b8471152d3
commit 6bf2779d61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 241 additions and 47 deletions

View file

@ -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 {