-NAVODKA-
DIAdiscord.js - Imagine an app
•Created by -NAVODKA- on 7/12/2023 in #djs-questions
An error when i try node main.js, im absolutely new at javascript and i wanna try to do my small bot
PS C:\Users\User\Desktop\Discord Bot> node main.js
node:internal/modules/cjs/loader:1327
throw err;
^
SyntaxError: C:\Users\User\Desktop\Discord Bot\config.json: Unexpected token : in JSON at position 7
at parse (<anonymous>)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (C:\Users\User\Desktop\Discord Bot\main.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
Node.js v18.16.1 (Here is the error)
const { Client, Intents} = require('discord.js');
const {token} = require('./config.json');
const client = new Clent({intents: [Intents.FLAGS.guilds]});
client.once('ready', ()=>{
console.log('Ready!');
})
client.login(token); (Here is my code)
41 replies