Red-DiscordBot/docs/framework_bank.rst
palmtree5 3febc94871 [V3] migration docs (#992)
* [Docs] start on migration guide

* [Docs] add more to migration docs

* [Docs] fix imports in examples

* [Docs] add migration guide to toctree

* [Docs] add a cog creation guide

* [Docs] expand on cog packages in migration guide

* Fix typo

* [Docs] add link for modlog docs
2017-10-22 21:05:47 -04:00

43 lines
804 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 redbot.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: