diff --git a/src/routes/guilds/#guild_id/members.ts b/src/routes/guilds/#guild_id/members.ts index 9c6efe32..49621469 100644 --- a/src/routes/guilds/#guild_id/members.ts +++ b/src/routes/guilds/#guild_id/members.ts @@ -50,6 +50,8 @@ router.get("/:member_id", async (req: Request, res: Response) => { router.put("/:member_id", async (req: Request, res: Response) => { const { guild_id, member_id } = req.params; + throw new HTTPError("Maintenance: Currently you can't add a member", 403) + // TODO: only for oauth2 applications await addMember(member_id, guild_id); res.sendStatus(204) }); @@ -58,6 +60,9 @@ router.put("/:member_id", async (req: Request, res: Response) => { router.delete("/:member_id", async (req: Request, res: Response) => { const { guild_id, member_id } = req.params; + const perms = await getPermission(req.user_id, guild_id); + perms.hasThrow("KICK_MEMBERS"); + await removeMember(member_id, guild_id); res.sendStatus(204) });