diff --git a/framework/src/structures/channels/guildAnnouncementChannel.ts b/framework/src/structures/channels/guildAnnouncementChannel.ts index a4294534..cf889620 100644 --- a/framework/src/structures/channels/guildAnnouncementChannel.ts +++ b/framework/src/structures/channels/guildAnnouncementChannel.ts @@ -4,10 +4,21 @@ import type { Client } from "../../client/mod.ts"; import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts"; -export class GuildAnnouncementChannel extends Mixin( - GuildTextBasedChannel, - GuildThreadAvailableChannel, -) { +const GuildAnnouncementChannelSuper: + & (abstract new ( + client: Client, + payload: GuildAnnouncementChannelPayload, + ) => GuildTextBasedChannel & GuildThreadAvailableChannel) + & Pick + & Pick< + typeof GuildThreadAvailableChannel, + keyof typeof GuildThreadAvailableChannel + > = Mixin( + GuildTextBasedChannel, + GuildThreadAvailableChannel, + ); + +export class GuildAnnouncementChannel extends GuildAnnouncementChannelSuper { payload: GuildAnnouncementChannelPayload; constructor( client: Client, diff --git a/framework/src/structures/channels/guildForumChannel.ts b/framework/src/structures/channels/guildForumChannel.ts index c3f836c1..374b2179 100644 --- a/framework/src/structures/channels/guildForumChannel.ts +++ b/framework/src/structures/channels/guildForumChannel.ts @@ -6,10 +6,22 @@ import { Emoji } from "../emojis/mod.ts"; import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts"; -export class GuildForumChannel extends Mixin( - GuildThreadAvailableChannel, - GuildTextBasedChannel, -) { +const GuildForumChannelSuper: + & (abstract new ( + client: Client, + payload: GuildForumChannelPayload, + ) => GuildThreadAvailableChannel & GuildTextBasedChannel) + & Pick< + typeof GuildThreadAvailableChannel, + keyof typeof GuildThreadAvailableChannel + > + & Pick = + Mixin( + GuildThreadAvailableChannel, + GuildTextBasedChannel, + ); + +export class GuildForumChannel extends GuildForumChannelSuper { payload: GuildForumChannelPayload; constructor(client: Client, payload: GuildForumChannelPayload) { super(client, payload); diff --git a/framework/src/structures/channels/guildTextBasedChannel.ts b/framework/src/structures/channels/guildTextBasedChannel.ts index a4520ab8..5ebad9f7 100644 --- a/framework/src/structures/channels/guildTextBasedChannel.ts +++ b/framework/src/structures/channels/guildTextBasedChannel.ts @@ -4,10 +4,18 @@ import { GuildChannel } from "./guildChannel.ts"; import type { GuildTextBasedChannelPayload } from "../../../../types/mod.ts"; import type { Client } from "../../client/mod.ts"; -export class GuildTextBasedChannel extends Mixin( - GuildChannel, - TextChannel, -) { +const GuildTextBasedChannelSuper: + & (abstract new ( + client: Client, + payload: GuildTextBasedChannelPayload, + ) => TextChannel & GuildChannel) + & Pick + & Pick = Mixin( + TextChannel, + GuildChannel, + ); + +export class GuildTextBasedChannel extends GuildTextBasedChannelSuper { payload: GuildTextBasedChannelPayload; constructor(client: Client, payload: GuildTextBasedChannelPayload) { super(client, payload); diff --git a/framework/src/structures/channels/guildTextChannel.ts b/framework/src/structures/channels/guildTextChannel.ts index e1c16969..07e063e2 100644 --- a/framework/src/structures/channels/guildTextChannel.ts +++ b/framework/src/structures/channels/guildTextChannel.ts @@ -4,10 +4,21 @@ import type { Client } from "../../client/mod.ts"; import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts"; -export class GuildTextChannel extends Mixin( - GuildTextBasedChannel, - GuildThreadAvailableChannel, -) { +const GuildTextChannelSuper: + & (abstract new ( + client: Client, + payload: GuildTextChannelPayload, + ) => GuildTextBasedChannel & GuildThreadAvailableChannel) + & Pick + & Pick< + typeof GuildThreadAvailableChannel, + keyof typeof GuildThreadAvailableChannel + > = Mixin( + GuildTextBasedChannel, + GuildThreadAvailableChannel, + ); + +export class GuildTextChannel extends GuildTextChannelSuper { payload: GuildTextChannelPayload; constructor(client: Client, payload: GuildTextChannelPayload) { super(client, payload); diff --git a/framework/src/structures/channels/guildVoiceChannel.ts b/framework/src/structures/channels/guildVoiceChannel.ts index e50854d2..21fe12d6 100644 --- a/framework/src/structures/channels/guildVoiceChannel.ts +++ b/framework/src/structures/channels/guildVoiceChannel.ts @@ -4,10 +4,19 @@ import type { Client } from "../../client/mod.ts"; import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; import { GuildVoiceBasedChannel } from "./guildVoiceBasedChannel.ts"; -export class GuildVoiceChannel extends Mixin( - GuildTextBasedChannel, - GuildVoiceBasedChannel, -) { +const GuildGuildVoiceChannelSuper: + & (abstract new ( + client: Client, + payload: GuildVoiceChannelPayload, + ) => GuildTextBasedChannel & GuildVoiceBasedChannel) + & Pick + & Pick = + Mixin( + GuildTextBasedChannel, + GuildVoiceBasedChannel, + ); + +export class GuildVoiceChannel extends GuildGuildVoiceChannelSuper { payload: GuildVoiceChannelPayload; constructor(client: Client, payload: GuildVoiceChannelPayload) { super(client, payload);