Defxult / discordLevelingSystem

A library to implement a leveling system into a discord bot. Contains features such as XP, level, ranks, and role awards.
MIT License
91 stars 17 forks source link

Add support for MongoDB #14

Closed jsmsj closed 2 years ago

jsmsj commented 2 years ago

Hi, i would like to request mongodb integration. as i want to host my py-cord bot on heroku and since heroku has ephemeral storage system, the .db files would be cleared out periodically. Hence i request support for mongodb

Defxult commented 2 years ago

That would require an almost complete overhaul of the library because of the different methods compared to SQLite, and that's something I am not willing to do at the moment. Maybe some time in the future but it's unlikely.

jsmsj commented 2 years ago

Well anyways, thankyou for early response. Hoping to see mongoDB support in future. You are awesome 😊

duncansykes commented 2 years ago

it's very easy to edit the code in the file levelling_system.py to add support for your own database, I managed to implement my own crud operations for PostgreSQL in about 5 hours. and it works really well. So if you need mongoDB support, i can imagine it would be just as easy. (make a crud file that handles all database operations, and just replace the database operations with those functions)