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

4 messages · Page 1 of 1 (latest)

autumn swallow
#
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

nova ploverBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
stable summit
#

Use the channel.isTextBased() typeguard to see if the method does exist