From fed115996ca62904b19f88785f66cc6c1da9959c Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 24 Oct 2017 22:53:10 -0400 Subject: [PATCH] Fix missing awaits (#1055) --- redbot/cogs/economy/economy.py | 2 +- redbot/core/bank.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/economy/economy.py b/redbot/cogs/economy/economy.py index feeeba944..5481c9dfa 100644 --- a/redbot/cogs/economy/economy.py +++ b/redbot/cogs/economy/economy.py @@ -286,7 +286,7 @@ class Economy: guild = ctx.guild if top < 1: top = 10 - if bank.is_global(): + if await bank.is_global(): bank_sorted = sorted(await bank.get_global_accounts(ctx.author), key=lambda x: x.balance, reverse=True) else: diff --git a/redbot/core/bank.py b/redbot/core/bank.py index 80a4e920e..f1cc0e9f2 100644 --- a/redbot/core/bank.py +++ b/redbot/core/bank.py @@ -318,7 +318,7 @@ async def get_guild_accounts(guild: discord.Guild) -> List[Account]: If the bank is currently global. """ - if is_global(): + if await is_global(): raise RuntimeError("The bank is currently global.") ret = [] @@ -349,7 +349,7 @@ async def get_global_accounts(user: discord.User) -> List[Account]: If the bank is currently guild specific. """ - if not is_global(): + if not await is_global(): raise RuntimeError("The bank is not currently global.") ret = []