mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
fix: Remove data conditional check (#11250)
* fix: remove conditional * types: sort types
This commit is contained in:
@@ -56,7 +56,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) {
|
||||||
|
|||||||
@@ -22,7 +22,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) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
this.unicodeEmoji = null;
|
this.unicodeEmoji = null;
|
||||||
|
|
||||||
if (data) this._patch(data);
|
this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
_patch(data) {
|
_patch(data) {
|
||||||
|
|||||||
@@ -49,7 +49,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) {
|
||||||
|
|||||||
@@ -22,7 +22,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
@@ -3841,7 +3841,7 @@ export interface PrivateThreadChannel extends ThreadChannel<false> {
|
|||||||
export interface ThreadChannel<ThreadOnly extends boolean = boolean>
|
export interface ThreadChannel<ThreadOnly extends boolean = boolean>
|
||||||
extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {}
|
extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {}
|
||||||
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;
|
||||||
@@ -4234,7 +4234,7 @@ export class VoiceState extends Base {
|
|||||||
// tslint:disable-next-line no-empty-interface
|
// tslint:disable-next-line no-empty-interface
|
||||||
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?: RawWebhookData);
|
private constructor(client: Client<true>, data: RawWebhookData);
|
||||||
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