mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
fix: add clone methods to GuildMember and GuildMemberRoleStore
Fixes #2312 This adds clone method to both classes to achieve the expected behaviour when cloning a GuildMember, also cloning their roles store
This commit is contained in:
@@ -128,6 +128,12 @@ class GuildMemberRoleStore extends DataStore {
|
||||
}
|
||||
}
|
||||
|
||||
clone() {
|
||||
const clone = new this.constructor(this.member);
|
||||
clone._patch(this.keyArray());
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a RoleResolvable to a Role object.
|
||||
* @method resolve
|
||||
|
||||
Reference in New Issue
Block a user