This is the code for messageCreate event that I wrote:
And in the discord app I am getting the response of the console log for no attachments even though I have tried sending images text and audio files:
You're most likely missing the MESSAGE_CONTENT
intent.
Go to https://discord.com/developers/applications/ and enable the Message Content Intent
in the Bot section.
Image for reference: https://i.sstatic.net/WVSXE.jpg
Also make sure to add the GatewayIntentBits.MessageContent
when you define your client.