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 7c82eb7 commit 8e14875
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/command/run/anilist_server/list_register_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ pub async fn get_the_list(
.members(&ctx.http, Some(MEMBER_LIST_LIMIT), last_id)
.await
.map_err(|e| FollowupError::UserOrGuild(format!("{:#?}", e)))?;
if members.is_empty() {
break;
}

for member in members {
last_id = Some(member.user.id);
Expand Down

0 comments on commit 8e14875

Please sign in to comment.