fix(GuildMember): Use editMe() conditionally for setNickname() helper (#11113)

fix(GuildMember): use `editMe()` conditionally

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jiralite
2025-09-24 20:38:47 +00:00
committed by GitHub
co-authored by kodiakhq[bot]
parent beed098bf2
commit 2d740d5279
@@ -459,7 +459,9 @@ class GuildMember extends Base {
* .catch(console.error);
*/
async setNickname(nick, reason) {
return this.edit({ nick, reason });
return this.user.id === this.client.user.id
? this.guild.members.editMe({ nick, reason })
: this.edit({ nick, reason });
}
/**