mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
[V3 Economy] Update from config changes (#1084)
This commit is contained in:
@@ -279,24 +279,12 @@ async def transfer_credits(from_: discord.Member, to: discord.Member, amount: in
|
||||
return await deposit_credits(to, amount)
|
||||
|
||||
|
||||
async def wipe_bank(user: Union[discord.User, discord.Member]):
|
||||
"""Delete all accounts from the bank.
|
||||
|
||||
.. important::
|
||||
|
||||
A member is required if the bank is currently guild specific.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
user : `discord.User` or `discord.Member`
|
||||
A user to be used in clearing the bank, this is required for technical
|
||||
reasons and it does not matter which user/member is used.
|
||||
|
||||
"""
|
||||
async def wipe_bank():
|
||||
"""Delete all accounts from the bank."""
|
||||
if await is_global():
|
||||
await _conf.user(user).clear()
|
||||
await _conf.clear_all_users()
|
||||
else:
|
||||
await _conf.member(user).clear()
|
||||
await _conf.clear_all_members()
|
||||
|
||||
|
||||
async def get_guild_accounts(guild: discord.Guild) -> List[Account]:
|
||||
@@ -330,14 +318,9 @@ async def get_guild_accounts(guild: discord.Guild) -> List[Account]:
|
||||
return ret
|
||||
|
||||
|
||||
async def get_global_accounts(user: discord.User) -> List[Account]:
|
||||
async def get_global_accounts() -> List[Account]:
|
||||
"""Get all global account data.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
user : discord.User
|
||||
A user to be used for getting accounts.
|
||||
|
||||
Returns
|
||||
-------
|
||||
`list` of `Account`
|
||||
@@ -409,7 +392,7 @@ async def is_global() -> bool:
|
||||
return await _conf.is_global()
|
||||
|
||||
|
||||
async def set_global(global_: bool, user: Union[discord.User, discord.Member]) -> bool:
|
||||
async def set_global(global_: bool) -> bool:
|
||||
"""Set global status of the bank.
|
||||
|
||||
.. important::
|
||||
|
||||
Reference in New Issue
Block a user