Tego Bot API Documentation v0.2.0
Tego Bot API Documentation / captureAndSave
Function: captureAndSave()
captureAndSave(
path,region?,options?):Promise<void>
Defined in: botjs/src/screenshot.ts:542
Capture and save screenshot in one call
Parameters
path
string
Output file path
region?
Optional region to capture
options?
Save options
Returns
Promise<void>
Example
typescript
// Full screen
await captureAndSave('screenshot.png');
// Region
await captureAndSave('region.jpg', { x: 0, y: 0, width: 800, height: 600 }, {
quality: 90
});