Tego Bot API Documentation v0.2.0
Tego Bot API Documentation / captureRegion
Function: captureRegion()
captureRegion(
x,y,width,height):Promise<ScreenshotResult>
Defined in: botjs/src/screenshot.ts:515
Capture region with simplified API
Parameters
x
number
X coordinate
y
number
Y coordinate
width
number
Width in pixels
height
number
Height in pixels
Returns
Promise<ScreenshotResult>
Screenshot result
Example
typescript
const screenshot = await captureRegion(0, 0, 1920, 1080);
await saveScreenshotToFile(screenshot, 'region.png');