wsmigielski / DiscordSpotifyBot

Bot that will change your current game status to the song playing in your Spotify desktop app.
MIT License
9 stars 6 forks source link

Putting the Token into the console #4

Closed wsmigielski closed 5 years ago

wsmigielski commented 7 years ago

The console asking for your token instead of you having to edit config.json

tilda commented 7 years ago

Maybe you could check if the config has the token inside, if not then ask for it

wsmigielski commented 7 years ago

Yeah I was thinking something along those lines but I am not familiar with promises and such in nodejs.

tilda commented 7 years ago

I'd think something like this:

var conf = JSON.parse(require('fs').readFileSync('config.json', 'utf8'))

if (conf.token=="")
    // ask for token
else
    // run bot from config