mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
fix: Remove data conditional check (#11250)
* fix: remove conditional * types: sort types
This commit is contained in:
@@ -61,7 +61,7 @@ class GuildMember extends Base {
|
|||||||
*/
|
*/
|
||||||
Object.defineProperty(this, '_roles', { value: [], writable: true });
|
Object.defineProperty(this, '_roles', { value: [], writable: true });
|
||||||
|
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PermissionOverwrites extends Base {
|
|||||||
*/
|
*/
|
||||||
Object.defineProperty(this, 'channel', { value: channel });
|
Object.defineProperty(this, 'channel', { value: channel });
|
||||||
|
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
this.unicodeEmoji = null;
|
this.unicodeEmoji = null;
|
||||||
|
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class ThreadChannel extends BaseChannel {
|
|||||||
* @type {ThreadMemberManager}
|
* @type {ThreadMemberManager}
|
||||||
*/
|
*/
|
||||||
this.members = new ThreadMemberManager(this);
|
this.members = new ThreadMemberManager(this);
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Webhook {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(this, 'client', { value: client });
|
Object.defineProperty(this, 'client', { value: client });
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
4
packages/discord.js/typings/index.d.ts
vendored
4
packages/discord.js/typings/index.d.ts
vendored
@@ -3525,7 +3525,7 @@ export interface ThreadChannel<ThreadOnly extends boolean = boolean>
|
|||||||
MessageChannelFields,
|
MessageChannelFields,
|
||||||
SendMethod<true> {}
|
SendMethod<true> {}
|
||||||
export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel {
|
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 archived: boolean | null;
|
||||||
public get archivedAt(): Date | null;
|
public get archivedAt(): Date | null;
|
||||||
public archiveTimestamp: number | null;
|
public archiveTimestamp: number | null;
|
||||||
@@ -3821,7 +3821,7 @@ export class VoiceState extends Base {
|
|||||||
|
|
||||||
export interface Webhook<Type extends WebhookType = WebhookType> extends WebhookFields {}
|
export interface Webhook<Type extends WebhookType = WebhookType> extends WebhookFields {}
|
||||||
export class Webhook<Type extends WebhookType = WebhookType> {
|
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 avatar: string | null;
|
||||||
public avatarURL(options?: ImageURLOptions): string | null;
|
public avatarURL(options?: ImageURLOptions): string | null;
|
||||||
public channelId: Snowflake;
|
public channelId: Snowflake;
|
||||||
|
|||||||
Reference in New Issue
Block a user