Skip to content

Tego Bot API Documentation v0.2.0


Tego Bot API Documentation / captureAndCopy

Function: captureAndCopy()

captureAndCopy(region?): Promise<void>

Defined in: botjs/src/screenshot.ts:567

Capture and copy to clipboard in one call

Parameters

region?

ScreenRegion

Optional region to capture

Returns

Promise<void>

Example

typescript
// Full screen
await captureAndCopy();

// Region
await captureAndCopy({ x: 0, y: 0, width: 800, height: 600 });

Released under the MIT License.