This commit is contained in:
Lamp 2018-11-04 23:04:16 -08:00
commit 7a1f9a9907
No known key found for this signature in database
GPG Key ID: 0F1F8704BEDE369E
3 changed files with 13 additions and 1 deletions

View File

@ -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', () => {

View File

@ -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") :

View File

@ -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`;