spacebarchat / spacebarchat/server

Backend: Bulk role & member add/remove functions

Open
#1,028 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
323
Avg merge
14h 48m
Merged PRs (30d)
4

Description

https://github.com/spacebarchat/server/blob/d865528442769b3d5683b75d0872b01da2b5374f/src/api/routes/guilds/%23guild_id/roles/%23role_id/members.ts#L45

The current method of adding or removing members one at a time causes a huge database overload when the guild is large. Doing all requested adds and removes in a single transaction should relieve the database pressure a bit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/api/routes/guilds/#guild_id/roles/#role_id/members.ts around line 45 and trace how member additions and removals currently reach the database. Implement the requested bulk behavior so all requested changes are handled in a single transaction, then verify that large-guild operations no longer perform one database operation per member.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.