my code is
client.on(“message”, async message => {
let args = message.content.substring(prefix.length).split(" ");
const puppeteer = require(‘puppeteer’);
switch(args[0]){
case 'stats':
message.delete()
const status = args.slice(1).join(' ');
let url = (encodeURI('https://krunker.io/social.html?p=profile&q=' + status))
const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox']
})
const page = await browser.newPage()
const options = {
path: 'screenshot.png',
fullPage: false,
clip: {
x: -10,
y: -313,
width: 838,
height: 365
}
}
await page.goto(url)
await page.setViewport({ width: 840, height: 520 })
haha = await page.screenshot(options);
message.channel.send({files:["screenshot.png"]})
browser.close();
}
})
and it works fine on VSC but, it doesn’t work on here and I’m 95% sure it’s because of the screenshots, it doesn’t save the screenshots correctly and IDK how I can implement that into Glitch.