aquax
v0.0.8
Published
A package that you can say a wrapper of other APIs and including other useful functions that helps you especially with your discord bot codes.
Downloads
1
Readme
Aquax
A package that you can say a wrapper of other APIs and including other useful functions that helps you especially with your discord bot codes.
✈ Import
NodeJs
const aquax = require("aquax");
ES6
import aquax from "aquax";
🍀 Anime
Setup
const aquax = require("aquax"); // Import
const anime = aquax.Anime;
client.on('message', async message => {
if (message.content === "a!hug") {
let hug = await anime.hug(); // Gets the data. Note: await must be used in this case.
message.channel.send(hug); // For images it returns link.
}
})
Documentation
Hug
let hug = await anime.hug();
message.channel.send(hug);
Waifu
let waifu = await anime.waifu();
message.channel.send(waifu);
Cuddle
let cuddle = await anime.cuddle();
message.channel.send(cuddle);
Tickle
let tickle = await anime.tickle();
message.channel.send(tickle);
Fact
let fact = await anime.fact();
message.channel.send(fact);
Wallpaper
let wallpaper = await anime.wallapaper();
message.channel.send(wallpaper);
🎲 Random
Setup
const aquax = require("aquax");
const random = aquax.Random;
client.on('message', async message => {
const args = message.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
if (command === "8ball") {
let answer = random.eightball();
let question = args.join(" ");
if (!question) return message.channel.send("You have to give a question");
message.channel.send(`Question: ${question}\nAnswer: ${answer}`);
}
})
Documentation
8ball
let eightball = await random.eightball();
message.channel.send(`Question: ${question}\nAnswer: ${answer}`);
Meme
let meme = await random.meme();
message.channel.send(meme);
🔎 Search
Setup
const aquax = require("aquax");
const search = aquax.Search;
client.on('message', async message => {
const args = message.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
if (command === "npm") {
let name = args[0];
if (!name) return message.channel.send("You have to give a question");
//let npm = await search.npm(name); Normal
let npm = await search.npm(name, "Failed to search that npm"); // Custom error
message.channel.send(npm);
}
})
Documentation
NPM
let npm = await search.npm(name, error);
message.channel.send(npm);