summary refs log tree commit diff
path: root/src/util/entities
diff options
context:
space:
mode:
authorochen1 <o.chen1@share.epsb.ca>2023-04-09 14:22:24 -0600
committerGitHub <noreply@github.com>2023-04-09 14:22:24 -0600
commit36ac484a9d6391831954729f499db89ec46a35e0 (patch)
treed5dc83b5dafd3fcd9285982d13e737746ab6e280 /src/util/entities
parentLicense information (diff)
downloadserver-36ac484a9d6391831954729f499db89ec46a35e0.tar.xz
Fix obvious bugs in Member removeRole function
Diffstat (limited to 'src/util/entities')
-rw-r--r--src/util/entities/Member.ts4
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(),