So basically, I get xp between 1 and 3 when I use the daily command and so every 100 xp I want to make it so it says that I leveled up. So, when the xp reaches 100 it levels up then when Im level two it costs 200 and then the xp resets and so on…
Uhhh sure…? I do not know if the MVC paradigm applies to discord bots, but probably in a controller file. Also, I assume by index you mean index.js - make sure you split up your files so you don’t have to wade through 1000 lines of code.
If you send your file tree here, I can help you more I guess.
Put the leveling script in the file where you change user’s information in the database. Like if you have a file that updates number of commands sent or name, put that there too.
Sorry if it’s kind of confusing.
I structured my backend app like
.
./views
./views/scripts
./views/styles
./views/
...
...
Bunch of EJS files
...
...
./create.js
./update.js
./static.js
...
...
so on, so forth
...
...
./package.json
So I would put the leveling script inside of ./update.js
how about in ./game/daily.js? Or in ./game/profile.js? It might be more practical to make a user update folder - for like claiming dailies, getting levels, getting Xp, gifts, etc.