Commit 1b7bde4 1 parent 4f67351 commit 1b7bde4 Copy full SHA for 1b7bde4
File tree 5 files changed +71
-20
lines changed
framework/src/structures/channels
5 files changed +71
-20
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,21 @@ import type { Client } from "../../client/mod.ts";
4
4
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts" ;
5
5
import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts" ;
6
6
7
- export class GuildAnnouncementChannel extends Mixin (
8
- GuildTextBasedChannel ,
9
- GuildThreadAvailableChannel ,
10
- ) {
7
+ const GuildAnnouncementChannelSuper :
8
+ & ( abstract new (
9
+ client : Client ,
10
+ payload : GuildAnnouncementChannelPayload ,
11
+ ) => GuildTextBasedChannel & GuildThreadAvailableChannel )
12
+ & Pick < typeof GuildTextBasedChannel , keyof typeof GuildTextBasedChannel >
13
+ & Pick <
14
+ typeof GuildThreadAvailableChannel ,
15
+ keyof typeof GuildThreadAvailableChannel
16
+ > = Mixin (
17
+ GuildTextBasedChannel ,
18
+ GuildThreadAvailableChannel ,
19
+ ) ;
20
+
21
+ export class GuildAnnouncementChannel extends GuildAnnouncementChannelSuper {
11
22
payload : GuildAnnouncementChannelPayload ;
12
23
constructor (
13
24
client : Client ,
Original file line number Diff line number Diff line change @@ -6,10 +6,22 @@ import { Emoji } from "../emojis/mod.ts";
6
6
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts" ;
7
7
import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts" ;
8
8
9
- export class GuildForumChannel extends Mixin (
10
- GuildThreadAvailableChannel ,
11
- GuildTextBasedChannel ,
12
- ) {
9
+ const GuildForumChannelSuper :
10
+ & ( abstract new (
11
+ client : Client ,
12
+ payload : GuildForumChannelPayload ,
13
+ ) => GuildThreadAvailableChannel & GuildTextBasedChannel )
14
+ & Pick <
15
+ typeof GuildThreadAvailableChannel ,
16
+ keyof typeof GuildThreadAvailableChannel
17
+ >
18
+ & Pick < typeof GuildTextBasedChannel , keyof typeof GuildTextBasedChannel > =
19
+ Mixin (
20
+ GuildThreadAvailableChannel ,
21
+ GuildTextBasedChannel ,
22
+ ) ;
23
+
24
+ export class GuildForumChannel extends GuildForumChannelSuper {
13
25
payload : GuildForumChannelPayload ;
14
26
constructor ( client : Client , payload : GuildForumChannelPayload ) {
15
27
super ( client , payload ) ;
Original file line number Diff line number Diff line change @@ -4,10 +4,18 @@ import { GuildChannel } from "./guildChannel.ts";
4
4
import type { GuildTextBasedChannelPayload } from "../../../../types/mod.ts" ;
5
5
import type { Client } from "../../client/mod.ts" ;
6
6
7
- export class GuildTextBasedChannel extends Mixin (
8
- GuildChannel ,
9
- TextChannel ,
10
- ) {
7
+ const GuildTextBasedChannelSuper :
8
+ & ( abstract new (
9
+ client : Client ,
10
+ payload : GuildTextBasedChannelPayload ,
11
+ ) => TextChannel & GuildChannel )
12
+ & Pick < typeof TextChannel , keyof typeof TextChannel >
13
+ & Pick < typeof GuildChannel , keyof typeof GuildChannel > = Mixin (
14
+ TextChannel ,
15
+ GuildChannel ,
16
+ ) ;
17
+
18
+ export class GuildTextBasedChannel extends GuildTextBasedChannelSuper {
11
19
payload : GuildTextBasedChannelPayload ;
12
20
constructor ( client : Client , payload : GuildTextBasedChannelPayload ) {
13
21
super ( client , payload ) ;
Original file line number Diff line number Diff line change @@ -4,10 +4,21 @@ import type { Client } from "../../client/mod.ts";
4
4
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts" ;
5
5
import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts" ;
6
6
7
- export class GuildTextChannel extends Mixin (
8
- GuildTextBasedChannel ,
9
- GuildThreadAvailableChannel ,
10
- ) {
7
+ const GuildTextChannelSuper :
8
+ & ( abstract new (
9
+ client : Client ,
10
+ payload : GuildTextChannelPayload ,
11
+ ) => GuildTextBasedChannel & GuildThreadAvailableChannel )
12
+ & Pick < typeof GuildTextBasedChannel , keyof typeof GuildTextBasedChannel >
13
+ & Pick <
14
+ typeof GuildThreadAvailableChannel ,
15
+ keyof typeof GuildThreadAvailableChannel
16
+ > = Mixin (
17
+ GuildTextBasedChannel ,
18
+ GuildThreadAvailableChannel ,
19
+ ) ;
20
+
21
+ export class GuildTextChannel extends GuildTextChannelSuper {
11
22
payload : GuildTextChannelPayload ;
12
23
constructor ( client : Client , payload : GuildTextChannelPayload ) {
13
24
super ( client , payload ) ;
Original file line number Diff line number Diff line change @@ -4,10 +4,19 @@ import type { Client } from "../../client/mod.ts";
4
4
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts" ;
5
5
import { GuildVoiceBasedChannel } from "./guildVoiceBasedChannel.ts" ;
6
6
7
- export class GuildVoiceChannel extends Mixin (
8
- GuildTextBasedChannel ,
9
- GuildVoiceBasedChannel ,
10
- ) {
7
+ const GuildGuildVoiceChannelSuper :
8
+ & ( abstract new (
9
+ client : Client ,
10
+ payload : GuildVoiceChannelPayload ,
11
+ ) => GuildTextBasedChannel & GuildVoiceBasedChannel )
12
+ & Pick < typeof GuildTextBasedChannel , keyof typeof GuildTextBasedChannel >
13
+ & Pick < typeof GuildVoiceBasedChannel , keyof typeof GuildVoiceBasedChannel > =
14
+ Mixin (
15
+ GuildTextBasedChannel ,
16
+ GuildVoiceBasedChannel ,
17
+ ) ;
18
+
19
+ export class GuildVoiceChannel extends GuildGuildVoiceChannelSuper {
11
20
payload : GuildVoiceChannelPayload ;
12
21
constructor ( client : Client , payload : GuildVoiceChannelPayload ) {
13
22
super ( client , payload ) ;
You can’t perform that action at this time.
0 commit comments