How do I send a message to a channel by channel id
I keep receiving an error as I am trying to send a msg to the channel, Is it a issue with how i am fetching the channel via id.
const channel = interaction.client.channels.fetch('1345305762481569822')
if (interaction.options.getUser('member').bot) {
await channel.send({embeds: [embed1]})
} else {
await channel.send({embeds: [embed1]})
await interaction.options.getUser('member').user.send({embeds: [embed2]})
}
interaction.options.getUser('member').ban({reason:interaction.options.getString('reason')})npm list discord.js and node node -v version?✅ Marked as resolved by OP