so my code is like that and i wanted to do something that says "pong" when we say "ping". I don't understand why it doesn't work and I'm a begginner, ty !
require('dotenv').config();
const { Client, GatewayIntentBits } = require('discord.js')
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
]
})
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});
client.login(process.env.DISCORD_TOKEN);