Files
the-nexus-fork/send_ws.py
2026-03-25 14:37:35 -04:00

12 lines
311 B
Python

import asyncio
import websockets
import json
import sys
async def send_msg(msg):
async with websockets.connect('ws://localhost:8765') as ws:
await ws.send(json.dumps({'type':'chat_message','content':msg,'username':'antigravity'}))
if __name__ == "__main__":
asyncio.run(send_msg(sys.argv[1]))