Skip to content

πŸ“š Elevate Your Content with Anime Insights! Use our npm package to effortlessly integrate random anime facts into your website, Discord bot, and beyond. 🌟

License

Notifications You must be signed in to change notification settings

kyrea/anime-facts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Generate random anime facts with a huge database.

Powered by Animu

Need support? Click here

Installation

$ npm install anime-facts

Usage

const random = require("anime-facts");
random.getFact().then((fact) => console.log(fact));

Discord Bot

const random = require("anime-facts");
const Discord = require("discord.js");
const client = new Discord.Client();

client.login("BOT_TOKEN");

client.on("message", async (message) => {
  //Plain Text
  if (message.content === "plain") {
    const fact = random.getFact();
    message.channel.send(fact);
  }
  //Embed Image (D.JS Version 11)
  if (message.content === "embed") {
    const fact = random.getFact();
    const embed = new Discord.RichEmbed().setDescription(fact);
    message.channel.send(embed);
  }
  //Embed Image (D.JS Version 12)
  if (message.content === "embed") {
    const fact = random.getFact();
    const embed = new Discord.MessageEmbed().setDescription(fact);
    message.channel.send(embed);
  }
});

Functions

Functions Description Usage
getFact Generate random anime facts. random.getFact()

Credits

@LamkasDev for adding facts to prior database.
@xMercyTheDeveloper for adding a fact to prior database.