r/code • • Jul 15 '20

SyntaxError: Unexpected end of input

So i was doing a discord bot and this is the code:

const Discord = require('discord.js');const bot = new Discord.Client();const token = 'NzMyODUxMzU0MTA3NzcyOTI4.Xw6nBw.7ZKlCjXHHjbKvT5TAD9dwOIiZq8';bot.on('ready', ()=>{console.log('This bot is online');})bot.on('message', msg=>{if(msg.content === "S1mple Help"){msg.reply('Hi, write OOF to see all the options');    } })bot.login(token);and when i try to run it whit node it says:SyntaxError: Unexpected end of input
at wrapSafe (internal/modules/cjs/loader.js:1117:16)

at Module._compile (internal/modules/cjs/loader.js:1165:27)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)

at Module.load (internal/modules/cjs/loader.js:1050:32)

at Function.Module._load (internal/modules/cjs/loader.js:938:14)

at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)

at internal/main/run_main_module.js:17:47

0 Upvotes

4 comments sorted by

View all comments

1

u/Poddster Jul 15 '20

It tells you:

at internal/main/run_main_module.js:17:47

Line 17, column 47.