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()