spacebarchat / server

Spacebar server - A reimplementation of the Discord.com backend, built with Typescript and love
https://spacebar.chat
GNU Affero General Public License v3.0
1.47k stars 252 forks source link

Bug fixes & handling for >75k/large_threshold guilds in Request Guild Members #1181

Closed DEVTomatoCake closed 2 months ago

DEVTomatoCake commented 2 months ago

Fixes two issues with guild_id and user_ids only accepting an array instead of only a string while both should technically be able to support strings too.

Also, there was a bug that occurred when requesting only non-existent user IDs, therefore erroring as chunks[0].not_found wasn't defined because there wasn't any other member that filled the chunks array.

The >75k or >large_threshold member count code was written in https://github.com/spacebarchat/server/commit/8313367fdb053bcbb772b3f1c667663392cb5b02 by @Puyodead1.