summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/routes/invites/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/invites/index.ts b/src/routes/invites/index.ts

index 7ffceb25..7f4ff59b 100644 --- a/src/routes/invites/index.ts +++ b/src/routes/invites/index.ts
@@ -21,7 +21,8 @@ router.delete("/:invite_code", async (req: Request, res: Response) => { const { guild_id, channel_id } = invite; const perms = await getPermission(req.user_id, guild_id, channel_id); - if (!perms.has("MANAGE_GUILD") || !perms.has("MANAGE_CHANNELS")) throw new HTTPError("You aren't allow", 401); + if (!perms.has("MANAGE_GUILD") && !perms.has("MANAGE_CHANNELS")) + throw new HTTPError("You missing the MANAGE_GUILD or MANAGE_CHANNELS permission", 401); await InviteModel.deleteOne({ code }).exec();