mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
fix(GuildMemberManager): Allow setting own nickname (#8066)
This commit is contained in:
@@ -299,11 +299,13 @@ class GuildMemberManager extends CachedManager {
|
|||||||
}
|
}
|
||||||
data.roles &&= data.roles.map(role => (role instanceof Role ? role.id : role));
|
data.roles &&= data.roles.map(role => (role instanceof Role ? role.id : role));
|
||||||
|
|
||||||
data.communication_disabled_until =
|
if (typeof data.communicationDisabledUntil !== 'undefined') {
|
||||||
// eslint-disable-next-line eqeqeq
|
data.communication_disabled_until =
|
||||||
data.communicationDisabledUntil != null
|
// eslint-disable-next-line eqeqeq
|
||||||
? new Date(data.communicationDisabledUntil).toISOString()
|
data.communicationDisabledUntil != null
|
||||||
: data.communicationDisabledUntil;
|
? new Date(data.communicationDisabledUntil).toISOString()
|
||||||
|
: data.communicationDisabledUntil;
|
||||||
|
}
|
||||||
|
|
||||||
let endpoint;
|
let endpoint;
|
||||||
if (id === this.client.user.id) {
|
if (id === this.client.user.id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user