my code
const Discord = require('discord.js');
const { Client, GatewayIntentBits } = require('discord.js');
const prefix = '$';
const client = new Discord.Client({
'intents': [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.DirectMessages
]
});
client.once('ready', () => {
console.log('- - - - -');
console.log('bot is online!');
console.log('- - - - -');
});
client.on('message', message => {
if(!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.split(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
if(command === 'ping'){
message.channel.send('pong');
}
});
client.login('TOKEN');
before i even got my bot online i had a problem with gatewayintentbits and after hours of figuring it out and running my bot it finally got online but when i added my first command it doesnt respond even after chaning prefix and adding multiple gateways i need help