From 38425173b960327e3205073e3cb564036b4013ef Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 23 Jan 2022 17:07:53 +0000 Subject: [PATCH] Fix BTC aspects of commands --- handler/commands.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/handler/commands.py b/handler/commands.py index 77d0b85..3c31c9d 100644 --- a/handler/commands.py +++ b/handler/commands.py @@ -1,6 +1,8 @@ # Other library imports -from json import dumps +from json import dumps, loads +# Project imports +from settings import settings class IRCCommands(object): class trades(object): @@ -26,7 +28,7 @@ class IRCCommands(object): class create(object): name = "create" authed = True - helptext = "Create an ad. Usage: create " + helptext = "Create an ad. Usage: create " @staticmethod def run(cmd, spl, length, authed, msg, agora, revolut, tx): @@ -89,7 +91,7 @@ class IRCCommands(object): if x["success"]: msg(f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}") else: - msg(x["response"]["data"]["message"]) + msg(dumps(x["response"])) # class brute(object): # name = "brute" @@ -198,7 +200,7 @@ class IRCCommands(object): if not agora_wallet_xmr["success"]: msg("Error getting Agora XMR balance.") return - agora_wallet_btc = agora.agora.wallet_balance_btc() + agora_wallet_btc = agora.agora.wallet_balance() if not agora_wallet_btc["success"]: msg("Error getting Agora BTC balance.") return @@ -371,7 +373,7 @@ class IRCCommands(object): @staticmethod def run(cmd, spl, length, authed, msg, agora, revolut, tx): rtrn = agora._update_prices() - msg(dumps(rtrn)) + msg("Running cheat in thread.") class ads(object): name = "ads"