mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-24 14:35:27 +00:00
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:
@@ -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",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user