How do i host on node.js and where do i input the code and what code?
Ok sorry im so new here, this might annoy you all but im really struggling, this discord music bot needs to stay online all the time but i dont know what code to put and where to put it on index.js as it doesnt work (host on uptimerobot??)
Someone please fork this and give me the code and where to put it please!!!
Or can someone just reply with the answers i have below???
also i think you guys can see the token and all, may someone tell me how to make it so that its hidden without any error on node.js??? THANKS!!
Very much appreciated!
If you want it to stay on all the time, either ping "evobot.lumiscnt.repl.co" with UptimeRobot (or another similar service), or purchase Hacker Plan and use their new always-on feature.
To hide your token(s), create a file called ".env". Place your tokens in that file, one on each line, in the format
<token name>=<token value>. Then, wherever you need to access it in your JS code, refer to
This codebase is currently extracting its keys from "config.json". Modify "util/EvobotUtil.js" so that lines 12-18 are replaced with:
and add this to your ".env" file:
Add everything in "config.json" in that format. I have intentionally cut off
YOUTUBE_API_KEY, though you should add these in full to your file.
@Lumiscnt I'll repeat two things:
Add everything in "config.json" in that format.
You need to add every part of "config.json" in the same format as the rest of the ".env" file.
Modify "util/EvobotUtil.js" so that lines 12-18 are replaced with:
You need to edit the file "util/EvobotUtil.js" as aforementioned.
so for the add in config i add only this :
(along with the rest of the token of course) and i copy and add the same thing for the .env file??? I did that
And i did modify the util/Evobot for lines 12-18 @19wintersp
@Lumiscnt You're very nearly there. The next thing you need to do is delete "config.json". After you've done that, you will still need to modify your ".env". As I said in my original post, you will need to add all of the things which were originally in "config.json" to ".env" in the "<key>=<value>" format; that is "PRUNING", "LOCALE", "STAY_TIME" and "DEFAULT_VOLUME", in addition to the ones you've already added. The ellipsis was a placeholder where I intended for you to fill these in.