Ok so I’m like really new to JavaScript so yeah please let me know what the error in this code is, Thanks!
The code:
const Discord = require('discord.js');
const bot = new Discord.client();
const token = '(token)';
bot.on('ready', () =>{
console.log('This bot is online!');
})
bot.login(token);
The error message in VS code terminal:
node .
C:\Users\hungr\desktop\DiscordBot\index.js:6
bot.on('ready', () => );
^
SyntaxError: Unexpected token ')'
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Please let me know what the problem is at it wont let me run my discord bot