spacebarchat / spacebarchat/server

[API] Bulk bans and ban list subscriptions

Open
#192 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the solution you'd like
The ban list returned by get guild bans API should have a list ID on top of current fields (ban list ID would be represented as the ID of the ban entry on user zero, for format compatibility with clients for discord.com; and the reason field of the ban entry of user ID zero would be used as the title of the ban list), which we could use in our ban lists to import that ban list as a whole. Each ban in the ban list should also have its own ban ID too (this would be handy for ability to edit the reason of a particular ban).

Then, using a PUT /guilds/{guild.id}/bans/{banlist.id} would add whole ban list with the specified ID into that guild's ban list by reference. Removing the reference to a banlist from the guild's banlist would be done similarly to removing any individual ban from the banlist.

TODO: how to adapt this into DMs, group DMs and user groups

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

No implementation files or tests are named. Start by locating the existing get guild bans API and the ban-removal route, then define how list and individual ban IDs, references, and titles should be represented. Resolve the open questions for DMs, group DMs, and user groups before implementation; done means the API and reference behavior are specified and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.