This commit is contained in:
Guy Van Sanden 2025-02-12 11:24:02 +01:00
parent e28d653921
commit 068af17935

View File

@ -34,9 +34,8 @@ def sendmessage(target, message):
ws.send(json_command) # Send message to WebSocket ws.send(json_command) # Send message to WebSocket
responsejson = ws.recv() # Receive response responsejson = ws.recv() # Receive response
response = json.loads(responsejson) response = json.loads(responsejson)
pprint(response['resp']) for chatitem in response['resp']['chatItems']:
# for chatitem in response['chatitems']: print(chatitem)
# print(chatitem)
# print("Message %s sent over websocket to %s" % (chatitem['content'], target)) # print("Message %s sent over websocket to %s" % (chatitem['content'], target))
# ws.close() # Close WebSocket connection # ws.close() # Close WebSocket connection
# print(response) # print(response)