Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

im trying to make a discord but but i keep getting the error "required is not defined"

I’m really new at this and I’m trying to get the bot to come online but no matter what I do the error message comes up, I also downloaded requirejs but it doesn’t seem to be working. basically, I have no idea what I’m doing and need help.

const {Clients, Intents} = require(discord.js);
const TOKEN = 'OTQyMTQ4Mjk4MTEyOTI1NzE3.YggR-g.Kpd9BcpatnkBRYZrpnNvT1b23_A'
const client = new Client({
    intents: [
        Inents.FLAGS.GUILDS,
        Intents.FLags.GUILD_MESSAGES,
    ]
});




client.once('ready', () => {
    console.log('Logged in as ${client.user.tag}')
});
client.login(TOKEN);

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You need to put discord.js in quotes like this:

const {Clients, Intents} = require("discord.js");
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading