I need to get info from the 'newitems_cs' channel, basically everything (shaded is not needed).
Server: wss: //wsn.dota2.net/wsn/
My code (it does not work):

const ws = new WebSocket('wss://wsn.dota2.net/wsn/'); ws.onopen = (data)=>{ ws.send('newitems_cs'); ws.on('newitems_cs', (data)=>{ console.log(data); }) } 

tenderloin with api

    1 answer 1

    Used ws package - https://www.npmjs.com/package/ws

     const webSocket = require("ws"); const ws = new webSocket('wss://wsn.dota2.net/wsn/'); ws.on('open', function open() { console.log('Connection open') ws.send('history_cs'); }); ws.on('message', function (message) { console.log(message); }); 
    • yes, you are right, I took the exact same code an hour ago from another person) - Anton1