diff options
author | ochen1 <o.chen1@share.epsb.ca> | 2023-04-09 14:22:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-09 14:22:24 -0600 |
commit | 36ac484a9d6391831954729f499db89ec46a35e0 (patch) | |
tree | d5dc83b5dafd3fcd9285982d13e737746ab6e280 /src/util/entities | |
parent | License information (diff) | |
download | server-36ac484a9d6391831954729f499db89ec46a35e0.tar.xz |
Fix obvious bugs in Member removeRole function
Diffstat (limited to 'src/util/entities')
-rw-r--r-- | src/util/entities/Member.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts index 13e74dcd..dc56bc47 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts @@ -260,9 +260,9 @@ export class Member extends BaseClassWithoutId { }, }, }), - await Role.findOneOrFail({ where: { id: role_id, guild_id } }), + Role.findOneOrFail({ where: { id: role_id, guild_id } }), ]); - member.roles = member.roles.filter((x) => x.id == role_id); + member.roles = member.roles.filter((x) => x.id !== role_id); await Promise.all([ member.save(), |