fix: Remove data conditional check (#11250)

* fix: remove conditional

* types: sort types
This commit is contained in:
Jiralite
2025-11-12 13:31:13 +00:00
committed by GitHub
parent e8217e335c
commit 837af56cf8
6 changed files with 7 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ class GuildMember extends Base {
*/
Object.defineProperty(this, '_roles', { value: [], writable: true });
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {

View File

@@ -24,7 +24,7 @@ class PermissionOverwrites extends Base {
*/
Object.defineProperty(this, 'channel', { value: channel });
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {

View File

@@ -38,7 +38,7 @@ class Role extends Base {
*/
this.unicodeEmoji = null;
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {

View File

@@ -55,7 +55,7 @@ class ThreadChannel extends BaseChannel {
* @type {ThreadMemberManager}
*/
this.members = new ThreadMemberManager(this);
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {

View File

@@ -23,7 +23,7 @@ class Webhook {
* @readonly
*/
Object.defineProperty(this, 'client', { value: client });
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {

View File

@@ -3525,7 +3525,7 @@ export interface ThreadChannel<ThreadOnly extends boolean = boolean>
MessageChannelFields,
SendMethod<true> {}
export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel {
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>);
private constructor(guild: Guild, data: RawThreadChannelData, client?: Client<true>);
public archived: boolean | null;
public get archivedAt(): Date | null;
public archiveTimestamp: number | null;
@@ -3821,7 +3821,7 @@ export class VoiceState extends Base {
export interface Webhook<Type extends WebhookType = WebhookType> extends WebhookFields {}
export class Webhook<Type extends WebhookType = WebhookType> {
private constructor(client: Client<true>, data?: unknown);
private constructor(client: Client<true>, data: unknown);
public avatar: string | null;
public avatarURL(options?: ImageURLOptions): string | null;
public channelId: Snowflake;