Red-DiscordBot/docs/framework_bank.rst
Will 7c3b2673a5 [Docs] Fix docs post pip install refactor (#969)
* Fix downloader

* Fix bank

* Fix cog manager

* Fix config

* Fix readme

* Add docs/test link to readme

* Add docs codeowners
2017-09-08 23:31:32 -04:00

43 lines
797 B
ReStructuredText

.. V3 Bank
.. role:: python(code)
:language: python
====
Bank
====
Bank has now been separated from Economy for V3. New to bank is support for
having a global bank.
***********
Basic Usage
***********
.. code-block:: python
from core import bank
class MyCog:
@commands.command()
async def balance(self, ctx, user: discord.Member=None):
if user is None:
user = ctx.author
bal = bank.get_balance(user)
currency = bank.get_currency_name(ctx.guild)
await ctx.send(
"{}'s balance is {} {}".format(
user.display_name, bal, currency
)
)
*************
API Reference
*************
Bank
======
.. automodule:: redbot.core.bank
:members: