channel.send is returning an error

is channel.send deprecated?
7 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
chewie 🌈
chewie 🌈2y ago
no, why do you think it is
TheRealGodSpeedy
well, when i use it, it says its undefined
chewie 🌈
chewie 🌈2y ago
the channel is undefined so I suggest you define it properly
TheRealGodSpeedy
ok
safi
safi2y ago
how did you define channel?
TheRealGodSpeedy
const auditchannel = client.channels.cache.get('id here') channel.send is actually auditchannel.send hmm ok