Getting ChannelType from APIInteractionDataResovledChannel

I'm currently trying to work with chat input commands. And when I create an channel option and use .getChannel() to retrieve it. The return type has APIInteractionDataResolvedChannel which can't be used with methods such as isTextBasedChannel() is there something I am doing wrong? I've checked the documetnation and APIInteractionDataResolvedChannel is not in the ChanelTypes typedef.
Solution:
You should use the discordjs methods to resolve slash commands parameters
Jump to solution
7 Replies
JcbSm
JcbSmOP2y ago
JcbSm
JcbSmOP2y ago
JcbSm
JcbSmOP2y ago
for isTextBasedChannel()
JcbSm
JcbSmOP2y ago
And getChannel() definitely reurns this
Favna
Favna2y ago
getChannel is for HTTP bots Not for discordjs
Solution
Favna
Favna2y ago
You should use the discordjs methods to resolve slash commands parameters
JcbSm
JcbSmOP2y ago
Oh it turns out I am
Want results from more Discord servers?
Add your server