From a665c2d53065918a82bb8129e5a57f43c36ddb50 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:12:27 +0200 Subject: [PATCH] Update create_channel.ts --- src/helpers/channels/create_channel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/channels/create_channel.ts b/src/helpers/channels/create_channel.ts index da902252f..9d675ed60 100644 --- a/src/helpers/channels/create_channel.ts +++ b/src/helpers/channels/create_channel.ts @@ -2,7 +2,7 @@ import { eventHandlers } from "../../bot.ts"; 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 { DiscordChannelTypes } from "../../types/channels/channel_types.ts"; import { CreateGuildChannel, @@ -38,7 +38,7 @@ export async function createChannel( // BITRATES ARE IN THOUSANDS SO IF USER PROVIDES 32 WE CONVERT TO 32000 if (options?.bitrate && options.bitrate < 1000) options.bitrate *= 1000; - const result = (await rest.runMethod( + const result = await rest.runMethod( "post", endpoints.GUILD_CHANNELS(guildId), { @@ -51,7 +51,7 @@ export async function createChannel( type: options?.type || DiscordChannelTypes.GUILD_TEXT, reason, }, - )) as DiscordChannel; + ); const discordenoChannel = await structures.createDiscordenoChannel(result); await cacheHandlers.set("channels", discordenoChannel.id, discordenoChannel);