Split MANAGE_GUILDS right into MANAGE_GUILDS for instance-wide control and SELF_EDIT_GUILDS for control over guilds you own or have perms to edit

This commit is contained in:
Madeline
2022-09-30 13:32:48 +10:00
parent 835a5ab3a3
commit 95e7238e8f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ router.patch(
const rights = await getRights(req.user_id);
const permission = await getPermission(req.user_id, guild_id);
if (!rights.has("MANAGE_GUILDS") || !permission.has("MANAGE_GUILD"))
if (!rights.has("SELF_EDIT_GUILDS") || !permission.has("MANAGE_GUILD"))
throw DiscordApiErrors.MISSING_PERMISSIONS.withParams(
"MANAGE_GUILD",
);