From 36ac484a9d6391831954729f499db89ec46a35e0 Mon Sep 17 00:00:00 2001 From: ochen1 Date: Sun, 9 Apr 2023 14:22:24 -0600 Subject: Fix obvious bugs in Member removeRole function --- src/util/entities/Member.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(), -- cgit 1.4.1