_Chri07_
_Chri07_
DIAdiscord.js - Imagine a boo! 👻
Created by _Chri07_ on 9/14/2023 in #djs-questions
Node js not starting
Hi, sorry if I do something wrong but I'm really new to this world. My problem is that I made a code for a bot in Visual Studio Code and the command "node index.js" in the terminal to make the bot go online and start nodejs doesn't work. I contacted the discord dev server and they invited me here, sorry if what I'm writing is not relevant with the topic of this channel. Here's the code and the discord.js version is 14.13.0.
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.login(token);
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.login(token);
51 replies