import { WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function connection(ws) { console.log("Connected"); ws.on('message', function incoming(message) { console.log('received: %s', message); }); ws.send(JSON.stringify({ type: "execute", data: "/say Owo" })); }); console.log("Listening..");