I'm working on a bot that detects words like 'communism' and 'socialism' in my discord server (it's an inside joke) but I keep encountering a error saying 'syntaxError: Unexpected end of input'. If anyone could tell me why I am experiencing this error, and how to fix it, it would be greatly appreciated. Here is my code so far:
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === 'communism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'socialism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'capitalism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'sexism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'racism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'fascism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'naxism') {
msg.reply('ISM SPOTTED')
} else if(msg.content === 'marxism') {
msg.reply('ISM SPOTTED')
};
client.login('[my token]');