summary refs log tree commit diff
path: root/api/src/routes/guilds
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/guilds')
-rw-r--r--api/src/routes/guilds/#guild_id/bans.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/bans.ts b/api/src/routes/guilds/#guild_id/bans.ts
index d9f62961..c73cc3e6 100644
--- a/api/src/routes/guilds/#guild_id/bans.ts
+++ b/api/src/routes/guilds/#guild_id/bans.ts
@@ -120,8 +120,9 @@ router.delete("/:user_id", route({ permission: "BAN_MEMBERS" }), async (req: Req
 
 	const banned_user = await User.getPublicUser(user_id);
 	
-	if (banned_user.user_id === banned_user.executor_id) throw new HTTPError("Self-bans are irreversible", 400);
-
+	if (banned_user.user_id === banned_user.executor_id) throw DiscordApiErrors.UNKNOWN_BAN;
+	// make self-bans irreversible and hide them from view to avoid victim chasing
+	
 	await Promise.all([
 		Ban.delete({
 			user_id: user_id,