Client = require('/home/me/Desktop/Client.js');
gClient = new Client("ws://www.multiplayerpiano.com:443");
gClient.setChannel("lobby");
gClient.start();
Client = require('Client.js'); // get from http://ourworldofpixels.com/srcpiano/Client.js
gClient = new Client("ws://ourworldofpixels.com:1234");
gClient.setChannel('A room that is bridged to Discord');
gClient.start();
var channel = undefined; // define this as whatever Discord channel you want to bridge to
gClient.on('a', msg => {
if (msg.p._id !== gClient.getOwnParticipant()._id)
channel.send("**"+msg.p.name+":** "+msg.a);
});
client.on('message', message => {
if (message.author !== client.user && message.channel === channel)
gClient.sendArray([{m:"a", message: message.member.displayName+": "+message.content}]);
});
So one of those headers were needed to get in. It wasn't the cookies. I figured out that all it needs is the "Origin" header! And that's it!!
SO, here is a modified Client.js that'll send that necessary header to enable you to connect to the MPP server from Nodejs!
Client = require('MPPclient.js');
gClient = new Client("ws://www.multiplayerpiano.com:443");
gClient.setChannel("MY EPIC NODEJS ROOM");
gClient.start();
const Client = require('MPPclient.js'); // get from https://gist.github.com/ledlamp/8c5872c73ee7ca57a1f396fc459f35c0
const gClient = new Client("ws://www.multiplayerpiano.com:443");
gClient.setChannel("MY EPIC DISCORD-BRIDGED ROOM");
gClient.start();
var channel = undefined; // define this as whatever Discord channel you want to bridge to
// MPP to Discord
gClient.on('a', msg => {
if (msg.p._id !== gClient.getOwnParticipant()._id)
channel.send("**"+msg.p.name+":** "+msg.a);
});
// Discord to MPP ('client' is the Discord client)
this is the log file but it's not accessing the proxy. What am I doing wrong here?
--
You received this message because you are subscribed to the Google Groups "Multiplayer Piano Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpp-forum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpp-forum/5de1e8da-2623-4c11-9b70-bb2f4c3e18f8n%40googlegroups.com.