1.0.6 • Published 4 years ago
random-anime v1.0.6
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