From f526bbdcbc4e541c0797fb5abc1cd70ce68a9f30 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 10 May 2021 18:03:20 +0200 Subject: :bug: fix Database toObject --- src/util/Permissions.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/util/Permissions.ts') diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts index 8debfa08..6b29248c 100644 --- a/src/util/Permissions.ts +++ b/src/util/Permissions.ts @@ -211,9 +211,7 @@ export async function getPermission( if (!member) member = await MemberModel.findOne({ guild_id, id: user_id }, "roles").exec(); if (!member) throw new Error("Member not found"); - roles = await RoleModel.find({ guild_id, id: { $in: member.roles } }) - .lean() - .exec(); + roles = await RoleModel.find({ guild_id, id: { $in: member.roles } }).exec(); } var permission = Permissions.finalPermission({ -- cgit 1.4.1