diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 1bd0dfd1dc09..9d573fc69eb2 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -274,7 +274,7 @@ class GuildMember extends Base { /** * The data for editing a guild member. * @typedef {Object} GuildMemberEditData - * @property {string} [nick] The nickname to set for the member + * @property {?string} [nick] The nickname to set for the member * @property {Collection|RoleResolvable[]} [roles] The roles or role IDs to apply * @property {boolean} [mute] Whether or not the member should be muted * @property {boolean} [deaf] Whether or not the member should be deafened @@ -319,7 +319,7 @@ class GuildMember extends Base { /** * Sets the nickname for this member. - * @param {string} nick The nickname for the guild member + * @param {?string} nick The nickname for the guild member, or `null` if you want to reset their nickname * @param {string} [reason] Reason for setting the nickname * @returns {Promise} */ diff --git a/typings/index.d.ts b/typings/index.d.ts index 38c575fb364f..d25a6220d4b2 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -830,7 +830,7 @@ declare module 'discord.js' { ): boolean; public kick(reason?: string): Promise; public permissionsIn(channel: ChannelResolvable): Readonly; - public setNickname(nickname: string, reason?: string): Promise; + public setNickname(nickname: string | null, reason?: string): Promise; public toJSON(): object; public toString(): string; public valueOf(): string; @@ -2648,7 +2648,7 @@ declare module 'discord.js' { | 'WELCOME_SCREEN_ENABLED'; interface GuildMemberEditData { - nick?: string; + nick?: string | null; roles?: Collection | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean;