Tego Bot API Documentation v0.2.0
Tego Bot API Documentation / getClipboardImage
Function: getClipboardImage()
getClipboardImage():
Buffer
Defined in: botjs/src/index.ts:586
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);