1.0.5 • Published 4 years ago

randomyuiz v1.0.5

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

randomyuiz

RandomYuiz API wrapper for Node.js

Installing

Version

# npm
npm i randomyuiz
yarn add randomyuiz

Example Usage

.animeImage(type)
  • type = "anime", "chika", "hayasaka", "kaguyashinomiya", "megumin", "oyasumi", "rem", "zerotwo"
async function start() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let img = await data.animeImage("anime"); //You can change "anime" with following options above

    console.log(img) //return an image
}
start()
.filterImage(type, imageURL)
  • type = "sepia", "grayscale", "invert"
  • imageURL(url) = (REQUIRED)
async function startRendering() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let img = await data.filterImage('sepia', 'https://cdn.ram.moe/Bk6IgCMel.jpg'); //if imageURL empty, it will return default image as example

    console.log(img) //return an image
}
startRendering()

Discord.js Example

async function startRendering() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let images = await data.filterImage('sepia', msg.author.avatarURL({size: 2048, format: 'png'}));

    msg.channel.send({ files: [{ attachment: images, name: 'sepia.png' }] }); //result
}
startRendering()
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago