summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-07 20:02:48 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-10-07 20:02:48 +1100
commit9340753ca0f504ac7e95bb054b69caa689137a14 (patch)
treec8b3a0ca64539bcb3069076dc1a3f4269b999060
parentembed fail (diff)
downloadserver-9340753ca0f504ac7e95bb054b69caa689137a14.tar.xz
fix self_edit_guilds right
-rw-r--r--src/api/routes/guilds/#guild_id/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts
index c8ee6551..ca7de430 100644
--- a/src/api/routes/guilds/#guild_id/index.ts
+++ b/src/api/routes/guilds/#guild_id/index.ts
@@ -44,9 +44,9 @@ router.patch(
 		const rights = await getRights(req.user_id);
 		const permission = await getPermission(req.user_id, guild_id);
 
-		if (!rights.has("SELF_EDIT_GUILDS") || !permission.has("MANAGE_GUILD"))
+		if (!rights.has("SELF_EDIT_GUILDS") && !permission.has("MANAGE_GUILD"))
 			throw DiscordApiErrors.MISSING_PERMISSIONS.withParams(
-				"MANAGE_GUILD",
+				"SELF_EDIT_GUILDS",
 			);
 
 		var guild = await Guild.findOneOrFail({