[TS] how come .send doesn't exist?

client.guilds.cache.get('asdsda')?.channels.cache.get('asd')?.send()
client.guilds.cache.get('asdsda')?.channels.cache.get('asd')?.send()
dont mind that the string fields are asdsda, the only error im getting as of now is that channel.send does not exist at all npm v.9.6.7 node v.18.3.0 discord.js v14.11.0
3 Replies
d.js toolkit
d.js toolkit16mo ago
- 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!
Squid
Squid16mo ago
Some guild chanenls have a send() method but not all, e.g. category channels Use the channel.isTextBased() typeguard to see if the method does exist
doqe
doqeOP16mo ago
thx, if i also make any other js projects (which i prly wont) ill try using this too
Want results from more Discord servers?
Add your server