Skip to content

Commit

Permalink
V2.10.1 Can't optimise much.
Browse files Browse the repository at this point in the history
now it break if there is no more user to prevent the useless more pass.
  • Loading branch information
ValgulNecron committed Jul 22, 2024
1 parent 8e14875 commit 8c6aa97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/command/run/anilist_server/list_register_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ pub async fn get_the_list(
let mut last_id: Option<UserId> = last_id;
let mut pass = 0;
while anilist_user.len() < MEMBER_LIST_LIMIT as usize && pass < PASS_LIMIT {
pass += 1;
let members = guild
.members(&ctx.http, Some(MEMBER_LIST_LIMIT), last_id)
.await
Expand All @@ -171,7 +172,6 @@ pub async fn get_the_list(
};
anilist_user.push(data)
}
pass += 1
}

let user_links: Vec<String> = anilist_user
Expand Down

0 comments on commit 8c6aa97

Please sign in to comment.