Have ideas to improve npm?Join in the discussion! »

    ards-client

    1.2.7-1 • Public • Published
    Logo

    Pulls Images from Reddit, Danbooru, rule34, e621, Konachan, and Yande.re
    NPM Version NPM Downloads OpenIssues

    Documentation | Support

    Installation

    Note: Node.js 12.0.0 or newer is required.

    //for npm
    npm i ards-client
    
    //for yarn
    yarn add ards-client
    

    Basic Usage

    Note: Replace tag with the tag you wanna use, list can be found here. Replace the function you want to use with a valid function from a tag of your choice, some functions can take arguments.

    const ards = require("ards-client"), ardsClient = new ards.Client();
    ardsClient.tag.function().then(request => {
        console.log(request);
    }).catch(error => {
        console.log(error);
    });

    Example usage

    Note: This example is for the Rule34 Tag using Discord.js and it's embeds.

    const ards = require("ards-client"), ardsClient = new ards.Client();
    args.push('solo_focus', 'rating:explicit')
    ardsClient.hentai.rule34(args).then(request => {
        try{
            if(request.post.failed){
                let embed = new Discord.MessageEmbed()
                .setDescription(`${args.join(', ')} is not a valid tag or there was an error with that command.  For list of avalible tags [click here](https://rule34.xxx/index.php?page=tags&s=list).`)
                .setColor('#ff0000')
                return message.channel.send(embed)
            }
            let embed = new Discord.MessageEmbed()
            .setImage(request.post.file_url)
            .addField("Image Info",`Image not loading? [Click Here](${request.post.file_url}})\n[View on Rule34](https://rule34.xxx/index.php?page=post&s=view&id=${request.post.id})`)
            .setColor(color)
            .setFooter(`👍 ${request.post.score} | ${new Date(request.post.created_at).toLocaleString()}`)
            message.channel.send(embed)
        }catch(error){
            console.log(error)
        }
    })

    Additional Information

    Documentation
    Support

    License

    MIT

    Install

    npm i ards-client

    DownloadsWeekly Downloads

    55

    Version

    1.2.7-1

    License

    MIT

    Unpacked Size

    26.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar