So i'm new to the whole Discord.JS thing and i am trying to figure out how to get the bot to write a message to the General Chat when a new person joins.
I have seen a lot of people doing it like this:
const channel = client.channels.cache.find(channel => channel.name === channelName)
channel.send(message)
But this isnt working for me. Whenever i am trying to send a message with the channel.send(message)
it gives me a error message.
I have also tried the version where you do it with the client.channels.cache.get(<Channel-ID>)
But this also didnt work for me.