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
jcbsmOP3y ago
jcbsm
jcbsmOP3y ago
jcbsm
jcbsmOP3y ago
for isTextBasedChannel()
jcbsm
jcbsmOP3y ago
And getChannel() definitely reurns this
Favna
Favna3y ago
getChannel is for HTTP bots Not for discordjs
Solution
Favna
Favna3y ago
You should use the discordjs methods to resolve slash commands parameters
jcbsm
jcbsmOP3y ago
Oh it turns out I am

Did you find this page helpful?