Hi Folks, trying to create my first Discord app. I have my bot logged in and I see it running. I've turned on Privileged Gateway Intents on the Developer Portal but my bot still won't listen to my Ping msgs.
Here is my code:
const { Client, GatewayIntentBits } = require('discord.js')
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
]
});
client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});
client.on('message', (message) => {
console.log(message);
if (message.content === 'Ping') {
console.log('pls work');
message.reply('Pong!');
}
});
client.login('XXX');