This commit is contained in:
Lamp 2021-08-16 10:53:04 -07:00
parent d00ebe21f8
commit bc03104ca9
1 changed files with 12 additions and 6 deletions

View File

@ -22,8 +22,10 @@ global.screenshotter = {
await new Promise(resolve => setTimeout(resolve, 5000)); await new Promise(resolve => setTimeout(resolve, 5000));
let screenshot = await page.screenshot({ type: 'png' }); let screenshot = await page.screenshot({ type: 'png' });
let filename = `Screenshot of www.multiplayerpiano.com @ ${new Date().toISOString()}.png`; let filename = `Screenshot of www.multiplayerpiano.com @ ${new Date().toISOString()}.png`;
let attachment = new Discord.MessageAttachment(screenshot, filename); await wh_hmpps.send({files:[{
await wh_hmpps.send(attachment); file: screenshot,
name: filename
}]});
} catch (error) { } catch (error) {
await wh_hmpps.send(`:warning: ${error.stack}`); await wh_hmpps.send(`:warning: ${error.stack}`);
} }
@ -34,8 +36,10 @@ global.screenshotter = {
await new Promise(resolve => setTimeout(resolve, 5000)); await new Promise(resolve => setTimeout(resolve, 5000));
let screenshot = await page.screenshot({ type: 'png' }); let screenshot = await page.screenshot({ type: 'png' });
let filename = `Screenshot of www.multiplayerpiano.com/✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧ @ ${new Date().toISOString()}.png`; let filename = `Screenshot of www.multiplayerpiano.com/✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧ @ ${new Date().toISOString()}.png`;
let attachment = new Discord.MessageAttachment(screenshot, filename); await wh_hrprs.send({files:[{
await wh_hrprs.send(attachment); file: screenshot,
name: filename
}]});
} catch(error) { } catch(error) {
await wh_hrprs.send(`:warning: ${error.stack}`); await wh_hrprs.send(`:warning: ${error.stack}`);
} }
@ -54,8 +58,10 @@ global.screenshotter = {
await new Promise(resolve => setTimeout(resolve, 13000)); await new Promise(resolve => setTimeout(resolve, 13000));
let screenshot = await page.screenshot({ type: 'png' }); let screenshot = await page.screenshot({ type: 'png' });
let filename = `Screenshot of ourworldofpixels.com/main @ ${new Date().toISOString()}.png`; let filename = `Screenshot of ourworldofpixels.com/main @ ${new Date().toISOString()}.png`;
let attachment = new Discord.MessageAttachment(screenshot, filename); await wh_howps.send({files:[{
await wh_howps.send(attachment); file: screenshot,
name: filename
}]});
} catch (error) { } catch (error) {
await wh_howps.send(`:warning: ${error.stack}`); await wh_howps.send(`:warning: ${error.stack}`);
} }