I tried making a discord bot..
I looked for some tutorials but my code doesn't seem to work..
I created a simple ping pong command but for some reason its not working!
Heres my bot.js code:
require('dotenv').config();
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, 'GuildMessages'] });
client.on('ready', () => {
console.log(`Thunder bot is ready! Tag is ${client.user.tag}`);
});
client.on('message', (messageCreate) => {
if (message.content === 'ping'){
message.reply('Pong!')
}
});
client.login(process.env.TOKEN);
But the ping pong command is not working!