Skip to content

Commit

Permalink
feat(GuildMember): make GuildMember#setNickname first param nullable (#…
Browse files Browse the repository at this point in the history
…5070)

* Update index.d.ts

* Update GuildMember.js

* Update src/structures/GuildMember.js

Co-authored-by: Jan <[email protected]>

* Update GuildMember.js

* Update index.d.ts

Co-authored-by: Jan <[email protected]>
  • Loading branch information
zaida04 and vaporoxx authored Dec 12, 2020
1 parent 77d4237 commit d70127c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/structures/GuildMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Snowflake, Role>|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
Expand Down Expand Up @@ -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<GuildMember>}
*/
Expand Down
4 changes: 2 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ declare module 'discord.js' {
): boolean;
public kick(reason?: string): Promise<GuildMember>;
public permissionsIn(channel: ChannelResolvable): Readonly<Permissions>;
public setNickname(nickname: string, reason?: string): Promise<GuildMember>;
public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
public toJSON(): object;
public toString(): string;
public valueOf(): string;
Expand Down Expand Up @@ -2648,7 +2648,7 @@ declare module 'discord.js' {
| 'WELCOME_SCREEN_ENABLED';

interface GuildMemberEditData {
nick?: string;
nick?: string | null;
roles?: Collection<Snowflake, Role> | readonly RoleResolvable[];
mute?: boolean;
deaf?: boolean;
Expand Down

0 comments on commit d70127c

Please sign in to comment.