Why isn't messageCreate getting triggered?
import { Client, GatewayIntentBits, Partials } from 'discord.js';
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});
client.once('ready', async c => {
console.log('bot is logged in');
});
client.on('messageCreate', async message => {
console.log('message received:', message.content);
});
client.login(process.env.DISCORD_BOT_TOKEN);
export default client;import { Client, GatewayIntentBits, Partials } from 'discord.js';
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});
client.once('ready', async c => {
console.log('bot is logged in');
});
client.on('messageCreate', async message => {
console.log('message received:', message.content);
});
client.login(process.env.DISCORD_BOT_TOKEN);
export default client;the on ready is getting logged, but when i send messages, there's no response. why not?
