Format return from creating ad

pull/1/head
Mark Veidemanis 3 years ago
parent aa8041e190
commit 3de4f16622
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -65,7 +65,10 @@ class IRCBot(irc.IRCClient):
elif cmd == "create" and host in self.admins and len(spl) == 3: elif cmd == "create" and host in self.admins and len(spl) == 3:
# Post an ad on AgoraDesk with the given country and currency code # Post an ad on AgoraDesk with the given country and currency code
posted = self.agora.create_ad(spl[1], spl[2]) 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: elif cmd == "messages" and host in self.admins and len(spl) == 1:
# Get all messages for all open trades # Get all messages for all open trades

Loading…
Cancel
Save