mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Bank/Economy] Fix leaderboard bug due to previous config PR (#894)
This commit is contained in:
parent
9a1064c81d
commit
0651a6ddc3
@ -207,7 +207,7 @@ def get_guild_accounts(guild: discord.Guild) -> Generator[Account, None, None]:
|
|||||||
if is_global():
|
if is_global():
|
||||||
raise RuntimeError("The bank is currently global.")
|
raise RuntimeError("The bank is currently global.")
|
||||||
|
|
||||||
accs = _conf.member(guild.owner).all()
|
accs = _conf.member(guild.owner).all_from_kind()
|
||||||
for user_id, acc in accs.items():
|
for user_id, acc in accs.items():
|
||||||
acc_data = acc.copy() # There ya go kowlin
|
acc_data = acc.copy() # There ya go kowlin
|
||||||
acc_data['created_at'] = _decode_time(acc_data['created_at'])
|
acc_data['created_at'] = _decode_time(acc_data['created_at'])
|
||||||
@ -225,7 +225,7 @@ def get_global_accounts(user: discord.User) -> Generator[Account, None, None]:
|
|||||||
if not is_global():
|
if not is_global():
|
||||||
raise RuntimeError("The bank is not currently global.")
|
raise RuntimeError("The bank is not currently global.")
|
||||||
|
|
||||||
accs = _conf.user(user).all() # this is a dict of user -> acc
|
accs = _conf.user(user).all_from_kind() # this is a dict of user -> acc
|
||||||
for user_id, acc in accs.items():
|
for user_id, acc in accs.items():
|
||||||
acc_data = acc.copy()
|
acc_data = acc.copy()
|
||||||
acc_data['created_at'] = _decode_time(acc_data['created_at'])
|
acc_data['created_at'] = _decode_time(acc_data['created_at'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user