diff --git a/packages/discord.js/src/structures/GuildMember.js b/packages/discord.js/src/structures/GuildMember.js index 0bfa5512d..bea548d30 100644 --- a/packages/discord.js/src/structures/GuildMember.js +++ b/packages/discord.js/src/structures/GuildMember.js @@ -56,7 +56,7 @@ class GuildMember extends Base { */ Object.defineProperty(this, '_roles', { value: [], writable: true }); - if (data) this._patch(data); + this._patch(data); } _patch(data) { diff --git a/packages/discord.js/src/structures/PermissionOverwrites.js b/packages/discord.js/src/structures/PermissionOverwrites.js index 356ef3ee1..27515aa12 100644 --- a/packages/discord.js/src/structures/PermissionOverwrites.js +++ b/packages/discord.js/src/structures/PermissionOverwrites.js @@ -22,7 +22,7 @@ class PermissionOverwrites extends Base { */ Object.defineProperty(this, 'channel', { value: channel }); - if (data) this._patch(data); + this._patch(data); } _patch(data) { diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index c2e7e81c8..c148324f6 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -34,7 +34,7 @@ class Role extends Base { */ this.unicodeEmoji = null; - if (data) this._patch(data); + this._patch(data); } _patch(data) { diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 6f8de0ce1..53fb2fa38 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -49,7 +49,7 @@ class ThreadChannel extends BaseChannel { * @type {ThreadMemberManager} */ this.members = new ThreadMemberManager(this); - if (data) this._patch(data); + this._patch(data); } _patch(data) { diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index 84c233c64..6c0ed4b93 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -22,7 +22,7 @@ class Webhook { * @readonly */ Object.defineProperty(this, 'client', { value: client }); - if (data) this._patch(data); + this._patch(data); } _patch(data) { diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index e8483d008..bc2515e37 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3841,7 +3841,7 @@ export interface PrivateThreadChannel extends ThreadChannel { export interface ThreadChannel extends Omit, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {} export class ThreadChannel extends BaseChannel { - private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client); + private constructor(guild: Guild, data: RawThreadChannelData, client?: Client); public archived: boolean | null; public get archivedAt(): Date | null; public archiveTimestamp: number | null; @@ -4234,7 +4234,7 @@ export class VoiceState extends Base { // tslint:disable-next-line no-empty-interface export interface Webhook extends WebhookFields {} export class Webhook { - private constructor(client: Client, data?: RawWebhookData); + private constructor(client: Client, data: RawWebhookData); public avatar: string | null; public avatarURL(options?: ImageURLOptions): string | null; public channelId: Snowflake;