#message.content empty

10 messages · Page 1 of 1 (latest)

wicked basin
winged perch
wicked basin
#

never used it

#

and worked

#

until 14v

livid matrix
#

what's worse is message content will soon become a privileged intent

livid viper
#

Everything works correctly, except the fact message.content is empty when it is supposed to be triggered by a message. This is the code and after that what I get when sending a message:

const fs = require('fs');
const { Client, GatewayIntentBits, Collection, IntentsBitField } = require('discord.js');
require('dotenv').config();

// Event and command files here...

client.on('messageCreate', (msg) => {
    console.log(msg);
    console.log(`Message recieved: ${msg.content}`);
});

client.login();
Message {
  channelId: '947712483727138849',
  guildId: '947712483727138846',
  id: '999759114899030087',
  createdTimestamp: 1658431547618,
  type: 0,
  system: false,
  content: '',
  author: User {
    id: '218062175636291586',
    bot: false,
    system: false,
    flags: UserFlagsBitField { bitfield: 128 },
    username: 'Raki',
    discriminator: '6677',
    avatar: '548cfb8953319c7d76d8019217771cb9',
    banner: undefined,
    accentColor: undefined
  },
  pinned: false,
  tts: false,
  nonce: '999759113934077952',
  embeds: [],
  components: [],
  attachments: Collection(0) [Map] {},
  stickers: Collection(0) [Map] {},
  editedTimestamp: null,
  reactions: ReactionManager { message: [Circular *1] },
  mentions: MessageMentions {
    everyone: false,
    users: Collection(0) [Map] {},
    roles: Collection(0) [Map] {},
    _members: null,
    _channels: null,
    crosspostedChannels: Collection(0) [Map] {},
    repliedUser: null
  },
  webhookId: null,
  groupActivityApplication: null,
  applicationId: null,
  activity: null,
  flags: MessageFlagsBitField { bitfield: 0 },
  reference: null,
  interaction: null
}
Message recieved:
winged perch
livid viper