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,6 +1,7 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
|
import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts";
|
||||||
|
|
||||||
export async function handleChannelCreate(data: DiscordGatewayPayload) {
|
export async function handleChannelCreate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
|
import {
|
||||||
|
DiscordChannel,
|
||||||
|
DiscordChannelTypes,
|
||||||
|
DiscordGatewayPayload,
|
||||||
|
} from "../../types/mod.ts";
|
||||||
|
|
||||||
export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
@@ -7,7 +12,9 @@ export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
|||||||
const cachedChannel = await cacheHandlers.get("channels", payload.id);
|
const cachedChannel = await cacheHandlers.get("channels", payload.id);
|
||||||
if (!cachedChannel) return;
|
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);
|
const guild = await cacheHandlers.get("guilds", payload.guild_id);
|
||||||
|
|
||||||
if (guild) {
|
if (guild) {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
|
import {
|
||||||
|
DiscordChannelPinsUpdate,
|
||||||
|
DiscordGatewayPayload,
|
||||||
|
} from "../../types/mod.ts";
|
||||||
|
|
||||||
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
|
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannelPinsUpdate;
|
const payload = data.d as DiscordChannelPinsUpdate;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
|
import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts";
|
||||||
|
|
||||||
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
|
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
|
|||||||
Reference in New Issue
Block a user