fix self_edit_guilds right
This commit is contained in:
parent
b2aac3eed7
commit
f73512aa02
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user