S-IAF
Join ServerSapphire - Imagine a framework
sapphire-support
Getting ChannelType from APIInteractionDataResovledChannel
JJcbSm12/16/2022
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.JJcbSm12/16/2022

JJcbSm12/16/2022

JJcbSm12/16/2022
for
isTextBasedChannel()
JJcbSm12/16/2022
And
getChannel()
definitely reurns this
FFavna12/16/2022
getChannel is for HTTP bots
FFavna12/16/2022
Not for discordjs
Solution
FFavna12/16/2022
You should use the discordjs methods to resolve slash commands parameters
JJcbSm12/19/2022
Oh it turns out I am