I'm quite new to working with discord bots, but I can't seem to figure out why this error keeps happening. I've attempted replacing 'message' with 'message creat', but it isn't resolving the issue at all. Here's a snippet of my code:
client.on('message', (message) => {
if(message.author.client) return;
if(message.channel.type !== 'text') return;
let prefix = '!';
let MessageArray = message.content.split(' ');
let cmd = MessageArray(0).slice(prefix.length)
let args = MessageArray.slice(1)
if(!message.content.startsWith(prefix)) return;
if(cmd == 'hello') {
message.channel.send({ messages: ['hello'] });
})