Merge branch 'master' of https://github.com/ledlamp/discord-mpp-bridge
This commit is contained in:
commit
7a1f9a9907
|
@ -35,7 +35,13 @@ dbClient.connect().then(function(){
|
|||
global.mdbClient = client;
|
||||
console.log("Connecting to Discord…");
|
||||
dClient.login(config.DISCORD_TOKEN);
|
||||
}, function(err){
|
||||
console.error("Failed to connect to MongoDB:\n", err.stack);
|
||||
process.exit(1);
|
||||
});
|
||||
}, function(err){
|
||||
console.error("Failed to connect to Postgres:\n", err.stack);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
dClient.once('ready', () => {
|
||||
|
|
|
@ -36,7 +36,7 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site =
|
|||
|
||||
|
||||
const gClient =
|
||||
site == "MPP" ? new Client(room == "lobby" ? "ws://mc.terrium.net:28886" :"ws://www.multiplayerpiano.com:443") :
|
||||
site == "MPP" ? new Client("ws://www.multiplayerpiano.com:443") :
|
||||
site == "WOPP" ? new Client("ws://ourworldofpixels.com:1234") :
|
||||
site == "MPT" ? new Client("ws://ts.terrium.net:8080") :
|
||||
site == "VFDP" ? new Client("ws://www.visualfiredev.com:8080") :
|
||||
|
|
|
@ -20,6 +20,12 @@ global.screenshotter = {
|
|||
try {
|
||||
await page.goto('http://ourworldofpixels.com');
|
||||
await page.evaluate(function () { OWOP.camera.zoom = 1; });
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await page.evaluate(function () {
|
||||
for (let butt of document.getElementsByTagName('button')) {
|
||||
if (butt.innerText == 'OK') {butt.click();break}
|
||||
}
|
||||
});
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
let screenshot = await page.screenshot({ type: 'png' });
|
||||
let filename = `Screenshot of ourworldofpixels.com/main @ ${new Date().toISOString()}.png`;
|
||||
|
|
Loading…
Reference in New Issue