From 68c3fffd03c7b364839555f7c5db1e50ac31cc42 Mon Sep 17 00:00:00 2001 From: DjDeveloperr <=> Date: Sun, 1 Nov 2020 17:22:16 +0530 Subject: [PATCH] Change Channel to TextChannel in messageCreate --- src/gateway/handlers/messageCreate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gateway/handlers/messageCreate.ts b/src/gateway/handlers/messageCreate.ts index a83504e..12fe46a 100644 --- a/src/gateway/handlers/messageCreate.ts +++ b/src/gateway/handlers/messageCreate.ts @@ -1,6 +1,7 @@ import { Channel } from "../../structures/channel.ts" import { Message } from "../../structures/message.ts" import { MessageMentions } from "../../structures/MessageMentions.ts" +import { TextChannel } from "../../structures/textChannel.ts" import { User } from "../../structures/user.ts" import { MessagePayload } from "../../types/channelTypes.ts" import { Gateway, GatewayEventHandler } from '../index.ts' @@ -11,7 +12,7 @@ export const messageCreate: GatewayEventHandler = async( ) => { let channel = await gateway.client.channels.get(d.channel_id) // Fetch the channel if not cached - if(!channel) channel = (await gateway.client.channels.fetch(d.channel_id) as any) as Channel + if(!channel) channel = (await gateway.client.channels.fetch(d.channel_id) as any) as TextChannel let user = new User(gateway.client, d.author) await gateway.client.users.set(d.author.id, d.author) let mentions = new MessageMentions()