UnbPy
About UnbPy
UnbPy is a library providing a Python interface to the UnbelivaBoat API. To use it, you need to get a token from the official documentation page. Also supports discord.py Guild and User objects.
Help
You can find an in-depth tutorial and a detailed documentation on our wiki.
Quick Start
Setup
- Install UnbPy.
- Go to the UnbelivaBoat site.
- Login to your Discord account.
- Go to the API page.
- Click "Copy" under the big string of red text. Your token is now in the clipboard.
>>> client = Client('Insert token here')
>>> guild = Guild(0) # Replace 0 with a Discord guild id
>>> user = User(0) # Replace 0 with a Discord user id
Functions
client.get_balance(guild, user)
Returns: User
with all attributes set.
client.get_leaderboard(guild)
Returns: list
of User
s with all attributes set, ordered by rank.
client.patch_balance(guild, user, cash, bank)
Returns: User
with all attributes except rank set and an updated balance.
client.set_balance(guild, user, cash, bank)
Returns: User
with all attributes except rank set and the new balance.
Dependencies
- Python
- aiohttp
- discord.py (optional)