diff --git a/src/handlers/channels/CHANNEL_CREATE.ts b/src/handlers/channels/CHANNEL_CREATE.ts index 2074c6c6c..06aa2c561 100644 --- a/src/handlers/channels/CHANNEL_CREATE.ts +++ b/src/handlers/channels/CHANNEL_CREATE.ts @@ -1,6 +1,7 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; import { structures } from "../../structures/mod.ts"; +import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts"; export async function handleChannelCreate(data: DiscordGatewayPayload) { const payload = data.d as DiscordChannel; diff --git a/src/handlers/channels/CHANNEL_DELETE.ts b/src/handlers/channels/CHANNEL_DELETE.ts index 91f7947d6..2a7f110eb 100644 --- a/src/handlers/channels/CHANNEL_DELETE.ts +++ b/src/handlers/channels/CHANNEL_DELETE.ts @@ -1,5 +1,10 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; +import { + DiscordChannel, + DiscordChannelTypes, + DiscordGatewayPayload, +} from "../../types/mod.ts"; export async function handleChannelDelete(data: DiscordGatewayPayload) { const payload = data.d as DiscordChannel; @@ -7,7 +12,9 @@ export async function handleChannelDelete(data: DiscordGatewayPayload) { const cachedChannel = await cacheHandlers.get("channels", payload.id); if (!cachedChannel) return; - if (cachedChannel.type === ChannelTypes.GUILD_VOICE && payload.guild_id) { + if ( + cachedChannel.type === DiscordChannelTypes.GUILD_VOICE && payload.guild_id + ) { const guild = await cacheHandlers.get("guilds", payload.guild_id); if (guild) { diff --git a/src/handlers/channels/CHANNEL_PINS_UPDATE.ts b/src/handlers/channels/CHANNEL_PINS_UPDATE.ts index 83de391d3..29ddb3a70 100644 --- a/src/handlers/channels/CHANNEL_PINS_UPDATE.ts +++ b/src/handlers/channels/CHANNEL_PINS_UPDATE.ts @@ -1,5 +1,9 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; +import { + DiscordChannelPinsUpdate, + DiscordGatewayPayload, +} from "../../types/mod.ts"; export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) { const payload = data.d as DiscordChannelPinsUpdate; diff --git a/src/handlers/channels/CHANNEL_UPDATE.ts b/src/handlers/channels/CHANNEL_UPDATE.ts index 961b4ddd8..cb7658a6d 100644 --- a/src/handlers/channels/CHANNEL_UPDATE.ts +++ b/src/handlers/channels/CHANNEL_UPDATE.ts @@ -1,6 +1,7 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; import { structures } from "../../structures/mod.ts"; +import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts"; export async function handleChannelUpdate(data: DiscordGatewayPayload) { const payload = data.d as DiscordChannel;