Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.02 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.02 KB

discdb

forthebadge made-with-python

Generic badge

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!

Installation

Using pip and git to install discdb.

pip install git+https://github.com/Hunter2807/discdb.git

Usage


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)

Contributing

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.


License

MIT