From 210fb9ae76fad5554c532ffb0c1551be633ef373 Mon Sep 17 00:00:00 2001 From: bforbiggy Date: Thu, 18 Aug 2022 16:19:45 -0400 Subject: [PATCH] Group ownership not required for member adding --- src/structures/PartialGroupDMChannel.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/structures/PartialGroupDMChannel.js b/src/structures/PartialGroupDMChannel.js index b9bc5d7..2eb1c96 100644 --- a/src/structures/PartialGroupDMChannel.js +++ b/src/structures/PartialGroupDMChannel.js @@ -133,15 +133,11 @@ class PartialGroupDMChannel extends Channel { * @returns {Promise} */ async addMember(user) { - if (this.ownerId !== this.client.user.id) { - return Promise.reject(new Error('NOT_OWNER_GROUP_DM_CHANNEL')); - } user = this.client.users.resolveId(user); if (!user) { return Promise.reject(new TypeError('User is not a User or User ID')); } - if (this.recipients.get(user)) return Promise.reject(new Error('USER_ALREADY_IN_GROUP_DM_CHANNEL')); - // + if (this.recipients.get(user)) return Promise.reject(new Error('USER_ALREADY_IN_GROUP_DM_CHANNEL')); // Fails sometimes if member leaves recently (ex. user leave msg's channel used for adding) await this.client.api.channels[this.id].recipients[user].put(); this.recipients.set(user, this.client.users.cache.get(user)); return this;