Libraries refactor and add some sinks #4

Closed
m wants to merge 136 commits from library-refactor into master
1 changed files with 7 additions and 5 deletions
Showing only changes of commit 38425173b9 - Show all commits

View File

@ -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 <country> <currency>"
helptext = "Create an ad. Usage: create <XMR/BTC> <country> <currency>"
@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"