0

I'm coding my first discord bot and I need some help in knowing which database would fit for this job so far I have tried saving my needed data in a json file but encountered some issues and heard some say that it's a bad practice my bot is a virtual food delivery bot which I used to store data like this in the json file


{
    "001": {
        "guildID": "some data here",
        "customer": "some data here",
        "order details": "some data here"
    }
}

usually these data get deleted after an "order" is delivered so I don't think I would need a big database? any suggestions for better ways to store these data?

1 Answer 1

1

Yes, JSON is a poor choice for a database. According to the Discord.JS maintainers:

"JSON files are prone to corruption when written to and read from a lot, which is why they should not be used as a form of database"

The Discord.JS guide includes 2 tutorials on setting up databases using Keyv or Sequalize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.