I've tried all the solutions for this posted and none of them work. It could be because I'm running MacOS, BigSur. I have the latest discord.js and node.js. Here are two examples that didn't work.
("message", function (message) {
if (message.content === "!command")
return channel01 = bot.channel.cache.find(channel => channel.id === "channelID");
channel01.send("message")
})
client.on('!command', client => {
client.channels.get('channelID').send('message');
})
I made a bot. It comes online and can return simple copycat messages in the personal messages between me and the bot. I want to be able to type the command anywhere in the server (it has several text channels) and have the message return in 1 specific text channel.