Skip to content

Commit

Permalink
fix(PermissionOverwriteManager): mutates user (#8283)
Browse files Browse the repository at this point in the history
  • Loading branch information
AppEternal committed Jul 17, 2022
1 parent 103a358 commit 3bf30b1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ class PermissionOverwriteManager extends CachedManager {
* .catch(console.error);
*/
edit(userOrRole, options, overwriteOptions) {
userOrRole = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole);
const existing = this.cache.get(userOrRole);
const existing = this.cache.get(this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole));
return this.upsert(userOrRole, options, overwriteOptions, existing);
}

Expand Down

0 comments on commit 3bf30b1

Please sign in to comment.