So I'm a beginner coder and specially with discord.js (used other languages more) but what I have never done is trying to store progress, the closest thing was with LUA in roblox but that was way more simple. How can I store simple variables (like money) so when I reset the bot it doesn't reset the variables?? The tutorials are kinda confusing to me
#Discord.js saving variables
1 messages · Page 1 of 1 (latest)
youll have to work with a database, or a file (like JSON or txt if even simpler) if it's really simple
variables are stored in memory, or RAM, so they are cleared soon after
well I do know about those 2 alternatives, the problem is I get confused with how exactly I save the variable, specially with databases, because every tutorial or documentation I look at is different
I don't wanna sound ultra lazy but do you have any suggested doc/guide?
If not it's alr, I'll prob try to understand saving in json
sorry im not familiar with node, someone else might answer your question later
you can use firebase for simple stuff like that, its an easy to use database that has great support for node.
Here is a tutorial: https://www.youtube.com/watch?v=YPsftzOURLw
Git Hub : https://github.com/syed-ashraf123/nodejs-firebase
Please add your own credentials in config file, otherwise it would not work. Thanks
I was about to say that lol
Yea, I don't know why its not used that much
its probably the easiest database to setup and deploy for small applications
Yea
As the other guy said, I've looked for quite some databases and didn't see a single mention of this one