bereck-work / discdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

License:MIT License


Languages

Language:Python 100.0%