I keep getting syntax errors when I attempt to run a discord bot on my VPS. I have all the required things installed on the VPS...
/root/node_modules/random.js:12 client.on('ready', () => {
^ SyntaxError: Unexpected token )
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:945:3
const Discord = require('discord.js');
const request = require('superagent');
const fs = require('fs');
const client = new Discord.Client({ fetch_all_members: false,
api_request_method: 'sequential' });
client.login(***);
client.on('ready', () => {
console.log('ready!');
});
client.on('channelCreate', channel => {
console.log('made ${channel.name}');
});
client.on('guildMemberAdd', (g, m) => {
console.log('${m.user.username} joined ${g.name}');
})
client.on('guildMemberUpdate', (g, o, n) => {
console.log(o.nickname, n.nickname);
});
client.on('debug', console.log);
I'm using Node version v0.10.46.