🅱 BruhAPI
Welcome to the fixed version of the BruhAPI NPM package! This package has many things to play around with such as text to image, random jokes & facts, random subreddit images, and more! A documentation of how to use each feature can be found below.
Note
This package can be used if the main package is currently broken, but you can use this anytime.
Initialize BruhAPI NPM
npm install bruhapi
will install the package.
const bruh = require("bruhapi-fixed")
will reference the package.
*Each function using BruhAPI should be async.
How to Use
Using the BruhAPI NPM module is very easy! Just use bruh('/endpoint')
and it'll return the res
query from the endpoint response. Most responses return res
for the most important query. Created by WILLM4937
, fixed by AizakkuDev
.
Examples
Fact
const bruh = require("bruhapi-fixed")
test()
async function test()
{console.log(await bruh('/fact'))}
This will return a fact to the console. Here is an example output: Washington, DC is the capital of the United States of America.
Chatbot (discord.js)
const bruh = require("bruhapi-fixed")
client.on("message", message => {
if (message.author.bot) return;
const response = await bruh('/cb/Never gonna give you up')
message.channel.send(response)
})
This will return a chatbot response in Discord. Since I inputted "Never gonna give you up", the bot will respond: Never gonna let you down.
If you have any questions, please join the Discord server!