0

i started coding my own bot and followed a tutorial thats outdated i used every bit of information to fix it but i cant fix it

const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages
    ]
});

let prefix = '-';

client.once('ready', () => {
    console.log('LC4 is Online');
});

client.on('messageCreate', message => {
    if (!message.content.startsWith(prefix) || message.author.bot) return;

    if (message.content === prefix + 'ping') {
        message.reply('pong!');
    }
});

client.login('token');

0 Answers0