Normalize names of attributes with Config instances (#3765)

* Lets normalize how we name config attributes across the bot.

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* ....

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* nothing to see here

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
Draper
2020-04-20 18:12:57 +01:00
committed by GitHub
parent df7ca65108
commit e4018ec677
22 changed files with 328 additions and 325 deletions

View File

@@ -48,15 +48,15 @@ class Bank(commands.Cog):
"""Base command for bank settings."""
if ctx.invoked_subcommand is None:
if await bank.is_global():
bank_name = await bank._conf.bank_name()
currency_name = await bank._conf.currency()
default_balance = await bank._conf.default_balance()
bank_name = await bank._config.bank_name()
currency_name = await bank._config.currency()
default_balance = await bank._config.default_balance()
else:
if not ctx.guild:
return
bank_name = await bank._conf.guild(ctx.guild).bank_name()
currency_name = await bank._conf.guild(ctx.guild).currency()
default_balance = await bank._conf.guild(ctx.guild).default_balance()
bank_name = await bank._config.guild(ctx.guild).bank_name()
currency_name = await bank._config.guild(ctx.guild).currency()
default_balance = await bank._config.guild(ctx.guild).default_balance()
settings = _(
"Bank settings:\n\nBank name: {bank_name}\nCurrency: {currency_name}\n"