TypeScript GuildText Channel Type help
I am attempting to fetch a channel to send a welcome message in my
guildMemberAdd
event. However, I am getting this type error:
Here is my event:
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!you have to type that channel as TextChannel
or check it at run time with channel.type === ChannelType.GuildText
since you have the id and you probably know the type this channel is then use the first suggestion