Open Ponnd opened 3 years ago
class Room {
constructor(path, token, isHeadless) {
this.isHeadless = isHeadless;
this.token = token;
this.path = path;
}
async start() {
const browser = await puppeteer.launch({
headless: this.isHeadless,
});
const page = await browser.newPage();
await page.goto('https://haxball.com/headless', {
waitUntil: 'networkidle2',
});
await page.addScriptTag({ path: this.path });
return page;
}
}
You can go on of this code to develop your script
class Room { constructor(path, token, isHeadless) { this.isHeadless = isHeadless; this.token = token; this.path = path; } async start() { const browser = await puppeteer.launch({ headless: this.isHeadless, }); const page = await browser.newPage(); await page.goto('https://haxball.com/headless', { waitUntil: 'networkidle2', }); await page.addScriptTag({ path: this.path }); return page; } }
You can go on of this code to develop your script
Thank you
is that still possible ? Can you tell more descriptive if possible? @ikramimamoglu
For example, I wrote a command from discord for ban someone in the room, this can be the command such as banIt(player.id,roomNumber) Is this possible? How can i do that?