Main.JS
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('TrooperCohen is online!');
});
client.login('BOT TOKEN');
Whenever I try to put my bot online by doing either "node ." or "ts-node main.js" I get this same symbol code where it says I am missing intents.
CodePudding user response:
Please remove the token from your question as it can lead to a security risk.
CodePudding user response:
I have the code as follows and it works flawlessly
const Discord = require('Discord.js');
const client = new Discord.Client();
client.on("ready", () => {
print.success(`The bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels in ${client.guilds.cache.size} guilds.`);
});
client.login(process.env.DISCORD_TOKEN);