This commit is contained in:
Guy Van Sanden 2025-02-12 11:17:48 +01:00
parent 06744aa5c7
commit f3ef9e55d5

View File

@ -31,7 +31,8 @@ def sendmessage(target, message):
uri = "ws://localhost:5080"
ws = websocket.create_connection(uri) # Blocking WebSocket connection
ws.send(json_command) # Send message to WebSocket
response = ws.recv() # Receive response
responsejson = ws.recv() # Receive response
response = json.loads(responsejson)
chatitems = response['resp']['chatitems']
for chatitem in chatitems:
print(chatitem)