1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-22 02:31:36 +02:00

Update Member.ts

This commit is contained in:
Intevel ツ 2021-05-08 13:10:30 +02:00
parent f5bcde72c6
commit f15e339611

View File

@ -132,7 +132,7 @@ export async function addRole(user_id: string, guild_id: string, role_id: string
guild_id: guild_id,
}, { $push: { roles: role_id } }).exec();
if(!memberObj) throw new HTTPError("Member not found", 404);
if(!memberObj) throw new HTTPError("Member not found", 404);
await emitEvent({
event: "GUILD_MEMBER_UPDATE",
@ -142,7 +142,7 @@ export async function addRole(user_id: string, guild_id: string, role_id: string
roles: memberObj.roles
},
user_id: user_id,
guild_id: guild_id,
} as GuildMemberUpdateEvent);
}
@ -168,7 +168,7 @@ export async function removeRole(user_id: string, guild_id: string, role_id: str
roles: memberObj.roles
},
user_id: user_id,
guild_id: guild_id,
} as GuildMemberUpdateEvent);
}