[V3 Config] Redesign "all_from_XXX" and "clear_all" methods (#1033)

* Added alternative to all_from_kind

* Returned dicts include default values

Also added docstrings

Also removed all_globals since it's kind of redundant and it wasn't working out for me

* Refactored clear_all

* Tests

* Tests again..

* Make all new methods coroutines
This commit is contained in:
Tobotimus
2017-10-20 14:22:58 +11:00
committed by Will
parent 13fef45e06
commit 815678584f
4 changed files with 257 additions and 112 deletions

View File

@@ -63,7 +63,7 @@ class Bank:
If the bank is global, it will become per-guild
If the bank is per-guild, it will become global"""
cur_setting = await bank.is_global()
await bank.set_global(not cur_setting, ctx.author)
await bank.set_global(not cur_setting)
word = _("per-guild") if cur_setting else _("global")