Format return from creating ad
This commit is contained in:
parent
aa8041e190
commit
3de4f16622
|
@ -65,7 +65,10 @@ class IRCBot(irc.IRCClient):
|
|||
elif cmd == "create" and host in self.admins and len(spl) == 3:
|
||||
# Post an ad on AgoraDesk with the given country and currency code
|
||||
posted = self.agora.create_ad(spl[1], spl[2])
|
||||
self.msg(channel, dumps(posted))
|
||||
if posted["success"]:
|
||||
self.msg(channel, f"{posted['response']['data']['message']}: {posted['response']['data']['ad_id']}")
|
||||
else:
|
||||
self.msg(channel, posted["response"]["data"]["message"])
|
||||
|
||||
elif cmd == "messages" and host in self.admins and len(spl) == 1:
|
||||
# Get all messages for all open trades
|
||||
|
|
Loading…
Reference in New Issue