mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fix(handlers): add missing imports (#723)
Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user