From 1300310669d1334811090b537e96acb34901c746 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 18 Oct 2018 13:38:54 +0100 Subject: Use "wallets" for !richest, not "coins" --- modules/coins.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/coins.py b/modules/coins.py index 4ba9b203..db754ab1 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -82,7 +82,11 @@ class Module(ModuleManager.BaseModule): self._set_user_wallets(user, wallets) def _all_coins(self, server): - coins = server.get_all_user_settings("coins", []) + coins = server.get_all_user_settings("wallets", []) + + for i, (nickname, wallet) in enumerate(coin_settings): + coins[i] = sum([decimal.Decimal(v) for v in wallet.values()]) + coins = list(filter(lambda coin: decimal.Decimal(coin[1]), coins)) return dict([(coin[0], decimal.Decimal(coin[1])) for coin in coins]) -- cgit v1.3.1-10-gc9f91