Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 619 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 619 Bytes

WaifuSocket

npm

node module to interface with the new waifulabs v2 websocket api

Documentation

Install

npm i waifusocket

Usage example

import fs from 'fs/promises';
import { WaifuSocket } from 'waifusocket';

const socket = await new WaifuSocket().login('SFMyNTY.JUSTSOMERANDOMCOOKIE');

const grid = await ws.genGrid();
console.log(grid.length);

const big = await ws.genBig(grid[0].seeds);
await fs.writeFile('./image.png', big.image);

ws.close();