summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/routes/guilds/#guild_id/members/#member_id/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/members/#member_id/index.ts b/api/src/routes/guilds/#guild_id/members/#member_id/index.ts
index 66c508a2..7e79caad 100644
--- a/api/src/routes/guilds/#guild_id/members/#member_id/index.ts
+++ b/api/src/routes/guilds/#guild_id/members/#member_id/index.ts
@@ -51,7 +51,8 @@ router.patch("/", check(MemberChangeSchema), async (req: Request, res: Response)
 });
 
 router.put("/", async (req: Request, res: Response) => {
-	const { guild_id, member_id } = req.params;
+	let { guild_id, member_id } = req.params;
+	if (member_id === "@me") member_id = req.user_id;
 
 	throw new HTTPError("Maintenance: Currently you can't add a member", 403);
 	// TODO: only for oauth2 applications