Try adding all_time, monthly and weekly together. If the club keeps its list of closed accounts the numbers will be slightly low compared to the website, which I believe counts closed members [Edit: no, see post #3] we can't see via api.chess.com (because on the website, team admins are the only ones who can see them, and via api.chess.com we are not logged in).
Example: Chess.com Developer Community
Website: 991
$ ./club-numbers chess-com-developer-community
chess-com-developer-community
weekly: 130
monthly: 108
all_time: 753
total: 991
Looks OK to me. No bug.
I created a String Array with all the users under the "all_time" JSON array. Chess.com says this club has 991 members. The string array only has 753 usernames. Just to doublecheck I manually copied everything after "all_time" and pasted it here:
https://wordcounttools.com/
It also shows the word count for "username" is 753.
Who is wrong?