1.1.3 • Published 2 years ago

yiffspot.js v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

About

yiffspot.js is a module that allows you to easily interact with YiffSpot.

Installation

Node.js 10.0.0 or newer is required.

npm install yiffspot.js
yarn add yiffspot.js
pnpm add yiffspot.js

Optional packages

  • bufferutil - Allows websocket client to efficiently perform operations such as masking and unmasking the data payload of the WebSocket frames. (npm install bufferutil)
  • utf-8-validate Allows websocket client to efficiently check if a message contains valid UTF-8. (npm install utf-8-validate)

Example usage

const YiffSpotJS = require('yiffspot.js');

const client = new YiffSpotJS.Client({
    "kinks": ["Deepthroat"], // or ["any"]
    "specie": "Arctic Fox",
    "role": "Switch",
    "gender": "Male"
});

client.on("ready", () => {
    console.log("Ready!");
    client.findPartner({
        "specie": ["Arctic Fox"], // or ["any"]
        "role": ["Submissive"], // or ["Switch"]
        "gender": ["Female"] // or ["any"]
    });
});

client.on("message", (message) => {
    console.log(`Partner: ${message.text}`);
    client.startTyping();
    message.reply("Got to go! </3");
    client.stopTyping();
    console.log("Me: Got to go! </3");
    client.destroy();
});


client.on("partnerLeft", () => {
    client.destroy();
});

client.on("partnerConnected", (partner) => {
    client.startTyping();
    partner.send("Hello!");
    client.stopTyping();
});

Links

Note

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago