Skip to content

Tego Bot API Documentation v0.1.1


Tego Bot API Documentation / getClipboardImage

Function: getClipboardImage()

getClipboardImage(): Buffer

Defined in: index.ts:608

Get image from clipboard as a PNG-encoded buffer

Returns

Buffer

PNG-encoded image buffer

Example

typescript
import { getClipboardImage } from "@tego/botjs";
import fs from "fs";

const imageBuffer = getClipboardImage();
fs.writeFileSync('clipboard.png', imageBuffer);

Released under the MIT License.