Home > Enterprise >  Discord Bot outputting nothing client.on('ready')
Discord Bot outputting nothing client.on('ready')

Time:04-30

Basically, when I run node . in my command prompt nothing is outputted.

My code:

const Discord = require("discord.js");

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] });

client.on("ready", () => {
    console.log(`Logged in as ${client.user.tag}`);
});
//My key is located here but I've taken it out for obvious reasons
client.login = "key";

CodePudding user response:

client.login = ('key');

If that is how your code looks and isn't just a typo in the question, that is invalid syntax. client.login() is a method. This is how it should look:

client.login('key');

That is most likely your issue.

CodePudding user response:


Hello there Justin

  • Related