DiscordBot icon indicating copy to clipboard operation
DiscordBot copied to clipboard

Auth.json issues

Open nickfoon opened this issue 10 years ago • 2 comments

Okay, I don't mean to be that guy... but I don't know what I'm doing wrong. My auth.json file looks like this { "email" : “[email protected]”, "password" : “password” } but when I run the bot, it gives me this error Please create an auth.json like auth.json.example with at least an email and password. SyntaxError: /Users/Nick/Desktop/DiscordBot-master/auth.json: Unexpected token “ at Object.parse (native) at Object.Module._extensions..json (module.js:424:27) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/Users/Nick/Desktop/DiscordBot-master/discord_bot.js:26:20) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) Am I just missing something really obvious?

nickfoon avatar Feb 17 '16 08:02 nickfoon

From this email it looks like you are using 2 different types of quotes. You can use either ' or ". As long as it's consistent for each separate string. Looks like you are using a 3rd type of quotes not sure how those are called. Also technically you don't need that last , at the end. It might even cause an error. Warning you in advance

Okay, I don't mean to be that guy... but I don't know what I'm doing wrong. My auth.json file looks like this { "email" : “[email protected]”, "password" : “password”, }

but when I run the bot, it gives me this error

Please create an auth.json like auth.json.example with at least an email and password. SyntaxError: /Users/Nick/Desktop/DiscordBot-master/auth.json: Unexpected token “ at Object.parse (native) at Object.Module._extensions..json (module.js:424:27) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (/Users/Nick/Desktop/DiscordBot-master/discord_bot.js:26:20) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32)

Am I just missing something really obvious?

— Reply to this email directly or view it on GitHub https://github.com/chalda/DiscordBot/issues/57.

chalda avatar Feb 17 '16 14:02 chalda

Okay, thanks. For some reason when I edited auth.json using my text editor it was creating an invalid 3rd type of quote, as you mentioned. To solve this, I simply opened the auth.json file with xcode and wrote the exact same code with the proper quotes. Thanks a lot for your help .:)

nickfoon avatar Feb 17 '16 17:02 nickfoon