discdb is a Python library for saving data in the form of dicts in Message objects to prevent the hassle of an external DB and Discord data being in discord itself!
Using pip and git to install discdb.
pip install git+https://github.com/Hunter2807/discdb.git
import discdb
bot = commands.Bot(...)
bot.db = discdb.DiscDB(bot)
@bot.command()
async def test(ctx):
existing_dict = await bot.db.get_json(...)
some_dict = {
"1": "One",
"2": "Two"
}
await bot.db.save_json(some_dict)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.