Skip to content

Hunter2809/discdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages