mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(PermissionOverwriteManager): mutates user (#8283)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user