I want the message to be sent to a specific channel when I give the command. I want the user to encounter an error if the command was not run on a particular channel. I need your help.
if (msg.author.bot) return;
if (msg.content.toLowerCase() === prefix + 'xgif' ) {
number = 100;
imageNumber = Math.floor (Math.random() * (number -1 + 1)) + 1;
client.channels.get(`channelID`).send( {files: ["./images/" + imageNumber + ".gif"]})
}
Error: TypeError: client.channels.get is not a function