From e5d1cc20492c9f6cecc9b11f06c0380dc6df9010 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 2 Sep 2020 00:14:21 +0100 Subject: [PATCH] fullPage: true? Unsure if you were aware but passing fullPage: true into the page.screenshot command will return the whole page. Really useful for some websites like Wikipedia where you may want more info. Perhaps you could add it as an optional arg to the command? --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c0f14f3..a3e447c 100644 --- a/index.js +++ b/index.js @@ -138,7 +138,7 @@ var fs = require("fs"); }); await page.setViewport({width: 1440, height: 900}); await page.goto(url); - var screenshot = await page.screenshot({type: 'png'}); + var screenshot = await page.screenshot({ type: 'png', fullPage: true }); resolve(await message.channel.send({files:[{ attachment: screenshot, name: "screenshot.png" }]})); } catch(error) { console.error(error); -- 2.39.3