How send message to specific channel by channel id?

i will try interaction.channels.fetch("ID") but fetch is not defined
4 Replies
d.js docs
d.js docs3y 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.
Dagan
Dagan3y ago
its interaction.guild.channels.feth You forgot guild
chewie
chewie3y ago
you dont need to fetch channels if you have the Guilds intent
d.js docs
d.js docs3y ago
const channel = client.channels.cache.get("222086648706498562");
const channel = client.channels.cache.find(channel => channel.name === "general");
const channel = client.channels.cache.get("222086648706498562");
const channel = client.channels.cache.find(channel => channel.name === "general");
• Caches in discord.js are Collections which extend the native Map structure. • learn more
Want results from more Discord servers?
Add your server