From d1ee697c84c7e476cab94160d82dca0848e490b7 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:48:24 +0300 Subject: [PATCH] There's something even more interesting called 'peerInfo.topics' lol. So bad it has no good docs and i have to do this stuff to learn more --- chatBot/includes/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chatBot/includes/client.js b/chatBot/includes/client.js index e9f77af..75e7b79 100644 --- a/chatBot/includes/client.js +++ b/chatBot/includes/client.js @@ -22,7 +22,9 @@ class Client extends EventEmitter { this.swarm.on('update', () => { console.log(`Peers count: ${this.swarm.connections.size}`); if(this.swarm.connections.size > 0) { - console.log([...this.swarm.peers]); + let arr = []; + [...this.swarm.peers].forEach(peer => arr.push([...peer.topics])); + console.log(arr); process.exit(-1); } });