random-anime

1.0.6 • Public • Published

Random Anime

NPM version NPM downloads

Generate random anime images with a huge database.

Installation

$ npm install random-anime

Usage

const randomanime = require('random-anime')
const anime = randomanime.anime()
const nsfw = randomanime.nsfw()
 
console.log(anime) //https://anime.jpg
console.log(nsfw)  //https://nsfw.jpg

Discord Bot

const randomanime = require("random-anime");
const Discord = require("discord.js");
const client = new Discord.Client();
 
client.on("message", async message => {
  /* Plain Text */
  if (message.content === "plain") {
    const anime = randomanime.anime();
    message.channel.send(anime);
  }
  /* Embed Image (D.JS Version 12) */
  if (message.content === "embed") {
    const anime = randomanime.anime();
    const embed = new Discord.MessageEmbed().setImage(anime);
    message.channel.send(embed);
  }
});
 
client.login("BOT_TOKEN");

Options

Options Description Usage
anime Random anime images. randomanime.anime()
nsfw Random NSFW anime images. randomanime.nsfw()

License

MIT © Amista

Package Sidebar

Install

npm i random-anime

Weekly Downloads

686

Version

1.0.6

License

MIT

Unpacked Size

489 kB

Total Files

10

Last publish

Collaborators

  • amista