private String avatar_decoration_asset_id(User u){
RestActionImpl<String> restAction = new RestActionImpl<>(u.getJDA(), Route.Users.GET_USER.compile(u.getId()), (response, request) -> {
DataObject json = response.getObject();
if (json.isNull("avatar_decoration_data")){ return "none";}
String id = json.getObject("avatar_decoration_data").getString("asset");
return id;
});
try {
return restAction.complete(true);
} catch (RateLimitedException e) {
System.out.println(e);
return "none";
}
}
i need to find out if this is the optimal way, i guess no, cause i somehow need to make it .queue(); so i can iterate through user list. But here is the thing i dont get.
If i make a forloop and iterate throuhg the list and then use this as my queue, how the foorloop supposed to know that the queue was sent already