From f733a36051ecdcca8074d223d0c5a07fc2fbca3b Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:27:33 +0200 Subject: [PATCH] Update get_channel.ts --- src/helpers/channels/get_channel.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/channels/get_channel.ts b/src/helpers/channels/get_channel.ts index e0023133a..9c27334aa 100644 --- a/src/helpers/channels/get_channel.ts +++ b/src/helpers/channels/get_channel.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { DiscordChannel } from "../../types/channels/channel.ts"; +import { Channel } from "../../types/channels/channel.ts"; import { endpoints } from "../../util/constants.ts"; /** Fetches a single channel object from the api. @@ -9,14 +9,14 @@ import { endpoints } from "../../util/constants.ts"; * ⚠️ **If you need this, you are probably doing something wrong. This is not intended for use. Your channels will be cached in your guild.** */ export async function getChannel(channelId: string, addToCache = true) { - const result = (await rest.runMethod( + const result = await rest.runMethod( "get", endpoints.CHANNEL_BASE(channelId), - )) as DiscordChannel; + ); const discordenoChannel = await structures.createDiscordenoChannel( result, - result.guild_id, + result.guildId, ); if (addToCache) { await cacheHandlers.set(