diff --git a/src/routes/api/v8/guilds/#id/index.ts b/src/routes/api/v8/guilds/#id/index.ts
index 09f2a5c2..e86d9416 100644
--- a/src/routes/api/v8/guilds/#id/index.ts
+++ b/src/routes/api/v8/guilds/#id/index.ts
@@ -24,7 +24,7 @@ router.get("/", async (req: Request, res: Response) => {
const guild = await GuildModel.findOne({ id: guild_id }).exec();
if (!guild) throw new HTTPError("Guild does not exist", 404);
- const member = await MemberModel.findOne({ guild_id: guild_id, id: req.userid }, "id").exec();
+ const member = await MemberModel.findOne({ guild_id: guild_id, id: req.user_id }, "id").exec();
if (!member) throw new HTTPError("You are not a member of the guild you are trying to access", 401);
return res.json(guild);
@@ -37,7 +37,7 @@ router.patch("/", check(GuildUpdateSchema), async (req: Request, res: Response)
const guild = await GuildModel.findOne({ id: guild_id }).exec();
if (!guild) throw new HTTPError("This guild does not exist", 404);
- const perms = await getPermission(req.userid, guild_id);
+ const perms = await getPermission(req.user_id, guild_id);
if (!perms.has("MANAGE_GUILD")) throw new HTTPError("You do not have the MANAGE_GUILD permission", 401);
await GuildModel.updateOne({ id: guild_id }, body).exec();
@@ -49,7 +49,7 @@ router.delete("/", async (req: Request, res: Response) => {
const guild = await GuildModel.findOne({ id: guild_id }, "owner_id").exec();
if (!guild) throw new HTTPError("This guild does not exist", 404);
- if (guild.owner_id !== req.userid) throw new HTTPError("You are not the owner of this guild", 401);
+ if (guild.owner_id !== req.user_id) throw new HTTPError("You are not the owner of this guild", 401);
await emitEvent({
event: "GUILD_DELETE",
|