@@ -647,7 +647,9 @@ export class BaseGuildEmoji extends Emoji {
647
647
public requiresColons : boolean | null ;
648
648
}
649
649
650
- export class BaseGuildTextChannel extends TextBasedChannelMixin ( GuildChannel , true ) {
650
+ // tslint:disable-next-line no-empty-interface
651
+ export interface BaseGuildTextChannel extends TextBasedChannelFields < true > , GuildChannel { }
652
+ export class BaseGuildTextChannel extends GuildChannel {
651
653
protected constructor ( guild : Guild , data ?: RawGuildChannelData , client ?: Client < true > , immediatePatch ?: boolean ) ;
652
654
public defaultAutoArchiveDuration ?: ThreadAutoArchiveDuration ;
653
655
public defaultThreadRateLimitPerUser : number | null ;
@@ -666,10 +668,11 @@ export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, tr
666
668
public setType ( type : ChannelType . GuildAnnouncement , reason ?: string ) : Promise < NewsChannel > ;
667
669
}
668
670
669
- export class BaseGuildVoiceChannel extends TextBasedChannelMixin ( GuildChannel , true , [
670
- 'lastPinTimestamp' ,
671
- 'lastPinAt' ,
672
- ] ) {
671
+ // tslint:disable-next-line no-empty-interface
672
+ export interface BaseGuildVoiceChannel
673
+ extends Omit < TextBasedChannelFields < true > , 'lastPinTimestamp' | 'lastPinAt' > ,
674
+ GuildChannel { }
675
+ export class BaseGuildVoiceChannel extends GuildChannel {
673
676
public constructor ( guild : Guild , data ?: RawGuildChannelData ) ;
674
677
public bitrate : number ;
675
678
public get full ( ) : boolean ;
@@ -1289,13 +1292,14 @@ export interface ResolvedFile {
1289
1292
contentType ?: string ;
1290
1293
}
1291
1294
1292
- export class DMChannel extends TextBasedChannelMixin ( BaseChannel , false , [
1293
- 'bulkDelete' ,
1294
- 'fetchWebhooks' ,
1295
- 'createWebhook' ,
1296
- 'setRateLimitPerUser' ,
1297
- 'setNSFW' ,
1298
- ] ) {
1295
+ // tslint:disable-next-line no-empty-interface
1296
+ export interface DMChannel
1297
+ extends Omit <
1298
+ TextBasedChannelFields < false > ,
1299
+ 'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW'
1300
+ > ,
1301
+ BaseChannel { }
1302
+ export class DMChannel extends BaseChannel {
1299
1303
private constructor ( client : Client < true > , data ?: RawDMChannelData ) ;
1300
1304
public flags : Readonly < ChannelFlagsBitField > ;
1301
1305
public recipientId : Snowflake ;
@@ -1574,7 +1578,8 @@ export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> {
1574
1578
public static resolve ( bit ?: BitFieldResolvable < GuildMemberFlagsString , GuildMemberFlags > ) : number ;
1575
1579
}
1576
1580
1577
- export class GuildMember extends PartialTextBasedChannel ( Base ) {
1581
+ export interface GuildMember extends PartialTextBasedChannelFields < false > , Base { }
1582
+ export class GuildMember extends Base {
1578
1583
private constructor ( client : Client < true > , data : RawGuildMemberData , guild : Guild ) ;
1579
1584
private _roles : Snowflake [ ] ;
1580
1585
public avatar : string | null ;
@@ -1925,7 +1930,9 @@ export class InteractionCollector<Interaction extends CollectedInteraction> exte
1925
1930
public once ( event : string , listener : ( ...args : any [ ] ) => void ) : this;
1926
1931
}
1927
1932
1928
- export class InteractionWebhook extends PartialWebhookMixin ( ) {
1933
+ // tslint:disable-next-line no-empty-interface
1934
+ export interface InteractionWebhook extends PartialWebhookFields { }
1935
+ export class InteractionWebhook {
1929
1936
public constructor ( client : Client < true > , id : Snowflake , token : string ) ;
1930
1937
public readonly client : Client < true > ;
1931
1938
public token : string ;
@@ -2469,17 +2476,21 @@ export interface DefaultReactionEmoji {
2469
2476
name : string | null ;
2470
2477
}
2471
2478
2472
- export abstract class ThreadOnlyChannel extends TextBasedChannelMixin ( GuildChannel , true , [
2473
- 'send' ,
2474
- 'lastMessage' ,
2475
- 'lastPinAt' ,
2476
- 'bulkDelete' ,
2477
- 'sendTyping' ,
2478
- 'createMessageCollector' ,
2479
- 'awaitMessages' ,
2480
- 'createMessageComponentCollector' ,
2481
- 'awaitMessageComponent' ,
2482
- ] ) {
2479
+ export interface ThreadOnlyChannel
2480
+ extends Omit <
2481
+ TextBasedChannelFields ,
2482
+ | 'send'
2483
+ | 'lastMessage'
2484
+ | 'lastPinAt'
2485
+ | 'bulkDelete'
2486
+ | 'sendTyping'
2487
+ | 'createMessageCollector'
2488
+ | 'awaitMessages'
2489
+ | 'createMessageComponentCollector'
2490
+ | 'awaitMessageComponent'
2491
+ > ,
2492
+ GuildChannel { }
2493
+ export abstract class ThreadOnlyChannel extends GuildChannel {
2483
2494
public type : ChannelType . GuildForum | ChannelType . GuildMedia ;
2484
2495
public threads : GuildForumThreadManager ;
2485
2496
public availableTags : GuildForumTag [ ] ;
@@ -3139,11 +3150,11 @@ export interface PrivateThreadChannel extends ThreadChannel<false> {
3139
3150
type : ChannelType . PrivateThread ;
3140
3151
}
3141
3152
3142
- export class ThreadChannel < ThreadOnly extends boolean = boolean > extends TextBasedChannelMixin ( BaseChannel , true , [
3143
- 'fetchWebhooks' ,
3144
- ' createWebhook',
3145
- 'setNSFW' ,
3146
- ] ) {
3153
+ // tslint:disable-next-line no-empty-interface
3154
+ export interface ThreadChannel < ThreadOnly extends boolean = boolean >
3155
+ extends Omit < TextBasedChannelFields < true > , 'fetchWebhooks' | ' createWebhook' | 'setNSFW' > ,
3156
+ BaseChannel { }
3157
+ export class ThreadChannel < ThreadOnly extends boolean = boolean > extends BaseChannel {
3147
3158
private constructor ( guild : Guild , data ?: RawThreadChannelData , client ?: Client < true > ) ;
3148
3159
public archived : boolean | null ;
3149
3160
public get archivedAt ( ) : Date | null ;
@@ -3238,7 +3249,9 @@ export class Typing extends Base {
3238
3249
} ;
3239
3250
}
3240
3251
3241
- export class User extends PartialTextBasedChannel ( Base ) {
3252
+ // tslint:disable-next-line no-empty-interface
3253
+ export interface User extends PartialTextBasedChannelFields < false > , Base { }
3254
+ export class User extends Base {
3242
3255
protected constructor ( client : Client < true > , data : RawUserData ) ;
3243
3256
private _equals ( user : APIUser ) : boolean ;
3244
3257
@@ -3491,7 +3504,9 @@ export class VoiceState extends Base {
3491
3504
public edit ( options : VoiceStateEditOptions ) : Promise < this> ;
3492
3505
}
3493
3506
3494
- export class Webhook extends WebhookMixin ( ) {
3507
+ // tslint:disable-next-line no-empty-interface
3508
+ export interface Webhook extends WebhookFields { }
3509
+ export class Webhook {
3495
3510
private constructor ( client : Client < true > , data ?: RawWebhookData ) ;
3496
3511
public avatar : string | null ;
3497
3512
public avatarURL ( options ?: ImageURLOptions ) : string | null ;
@@ -3537,7 +3552,9 @@ export class Webhook extends WebhookMixin() {
3537
3552
public send ( options : string | MessagePayload | WebhookMessageCreateOptions ) : Promise < Message > ;
3538
3553
}
3539
3554
3540
- export class WebhookClient extends WebhookMixin ( BaseClient ) {
3555
+ // tslint:disable-next-line no-empty-interface
3556
+ export interface WebhookClient extends WebhookFields , BaseClient { }
3557
+ export class WebhookClient extends BaseClient {
3541
3558
public constructor ( data : WebhookClientData , options ?: WebhookClientOptions ) ;
3542
3559
public readonly client : this;
3543
3560
public options : WebhookClientOptions ;
@@ -4485,22 +4502,6 @@ export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, type
4485
4502
4486
4503
export type Constructable < Entity > = abstract new ( ...args : any [ ] ) => Entity ;
4487
4504
4488
- /** @internal */
4489
- export function PartialTextBasedChannel < Entity > (
4490
- Base ?: Constructable < Entity > ,
4491
- ) : Constructable < Entity & PartialTextBasedChannelFields < false > > ;
4492
-
4493
- /** @internal */
4494
- export function TextBasedChannelMixin <
4495
- Entity ,
4496
- InGuild extends boolean = boolean ,
4497
- IgnoredFields extends keyof TextBasedChannelFields < InGuild > = never ,
4498
- > (
4499
- Base ?: Constructable < Entity > ,
4500
- inGuild ?: InGuild ,
4501
- ignore ?: IgnoredFields [ ] ,
4502
- ) : Constructable < Entity & Omit < TextBasedChannelFields < InGuild > , IgnoredFields > > ;
4503
-
4504
4505
export interface PartialTextBasedChannelFields < InGuild extends boolean = boolean > {
4505
4506
send ( options : string | MessagePayload | MessageCreateOptions ) : Promise < Message < InGuild > > ;
4506
4507
}
@@ -4531,11 +4532,6 @@ export interface TextBasedChannelFields<InGuild extends boolean = boolean>
4531
4532
setNSFW ( nsfw ?: boolean , reason ?: string ) : Promise < this> ;
4532
4533
}
4533
4534
4534
- /** @internal */
4535
- export function PartialWebhookMixin < Entity > ( Base ?: Constructable < Entity > ) : Constructable < Entity & PartialWebhookFields > ;
4536
- /** @internal */
4537
- export function WebhookMixin < Entity > ( Base ?: Constructable < Entity > ) : Constructable < Entity & WebhookFields > ;
4538
-
4539
4535
/** @internal */
4540
4536
export interface PartialWebhookFields {
4541
4537
id : Snowflake ;
0 commit comments