-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 feat: idk there're so many changes
- Loading branch information
1 parent
0c101fd
commit aa1de8d
Showing
21 changed files
with
205 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import type { GatewayHandler } from "../../types/gateway.ts"; | ||
import messageCreate from "./messageCreate.ts"; | ||
import ready from "./ready.ts"; | ||
|
||
// deno-lint-ignore no-explicit-any | ||
export const GatewayHandlers: { [K: string]: GatewayHandler<any> } = { | ||
MESSAGE_CREATE: messageCreate, | ||
READY: ready, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { GatewayReadyPayload } from "../../../types/mod.ts"; | ||
import { GatewayHandler } from "../../types/gateway.ts"; | ||
import type { Client } from "../client/mod.ts"; | ||
import { User } from "../structures/mod.ts"; | ||
|
||
const ready: GatewayHandler<"READY"> = ( | ||
client: Client, | ||
d: [number, GatewayReadyPayload], | ||
) => { | ||
const user = new User(client, d[1].user); | ||
client.user = user; | ||
client.users.set(user.id, d[1].user); | ||
|
||
d[1].guilds.forEach((g) => { | ||
client.guilds.set(g.id, g); | ||
}); | ||
|
||
client.emit("ready"); | ||
}; | ||
|
||
export default ready; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
framework/src/structures/channels/guildAnnouncementChannel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import type { GuildAnnouncementChannelPayload } from "../../../../types/mod.ts"; | ||
import { Mixin } from "../../../deps.ts"; | ||
import type { Client } from "../../client/mod.ts"; | ||
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; | ||
import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts"; | ||
|
||
export class GuildAnnouncementChannel extends Mixin( | ||
GuildTextBasedChannel<GuildAnnouncementChannelPayload>, | ||
GuildThreadAvailableChannel<GuildAnnouncementChannelPayload>, | ||
GuildTextBasedChannel, | ||
GuildThreadAvailableChannel, | ||
) { | ||
payload: GuildAnnouncementChannelPayload; | ||
constructor( | ||
client: Client, | ||
payload: GuildAnnouncementChannelPayload, | ||
) { | ||
super(client, payload); | ||
this.payload = payload; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
import type { GuildCategoryPayload } from "../../../../types/mod.ts"; | ||
import type { Client } from "../../client/mod.ts"; | ||
import { GuildChannel } from "./guildChannel.ts"; | ||
|
||
export class GuildCategory extends GuildChannel<GuildCategoryPayload> {} | ||
export class GuildCategory extends GuildChannel { | ||
payload: GuildCategoryPayload; | ||
constructor(client: Client, payload: GuildCategoryPayload) { | ||
super(client, payload); | ||
this.payload = payload; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import type { GuildStageChannelPayload } from "../../../../types/mod.ts"; | ||
import type { Client } from "../../client/mod.ts"; | ||
import { GuildVoiceBasedChannel } from "./guildVoiceBasedChannel.ts"; | ||
|
||
export class GuildStageChannel | ||
extends GuildVoiceBasedChannel<GuildStageChannelPayload> {} | ||
export class GuildStageChannel extends GuildVoiceBasedChannel { | ||
payload: GuildStageChannelPayload; | ||
constructor(client: Client, payload: GuildStageChannelPayload) { | ||
super(client, payload); | ||
this.payload = payload; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import type { GuildTextChannelPayload } from "../../../../types/mod.ts"; | ||
import { Mixin } from "../../../deps.ts"; | ||
import type { Client } from "../../client/mod.ts"; | ||
import { GuildTextBasedChannel } from "./guildTextBasedChannel.ts"; | ||
import { GuildThreadAvailableChannel } from "./guildThreadAvailableChannel.ts"; | ||
|
||
export class GuildTextChannel extends Mixin( | ||
GuildTextBasedChannel<GuildTextChannelPayload>, | ||
GuildThreadAvailableChannel<GuildTextChannelPayload>, | ||
GuildTextBasedChannel, | ||
GuildThreadAvailableChannel, | ||
) { | ||
payload: GuildTextChannelPayload; | ||
constructor(client: Client, payload: GuildTextChannelPayload) { | ||
super(client, payload); | ||
this.payload = payload; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
framework/src/structures/channels/guildThreadAvailableChannel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.