popcat-wrapper

1.5.4 • Public • Published

PopCat-Wrapper

NPM version NPM downloads

NPM Banner

Community

Join Our Server If you want to have fun or need any support!

ko-fi

Installation

npm i popcat-wrapper

Examples

Create A Paste Bin at https://code.popcat.xyz

  • Join https://popcat.xyz/server and DM Zero Two#999 to get a key!
const {CodeClient} = require("popcat-wrapper")
const client = new CodeClient({ key: "your key" })

async function create() {
const bin = await client.createBin({
		title: "string",
		description: "string",
		code: "string"
	})
console.log(bin)
}
create()

Jokes command, no input example:

const pop = require("popcat-wrapper")
const Discord = require("discord.js")
const client = new Discord.Client()


client.on("message", async message => {
if (message.content.toLowerCase() === ">joke") {
  const joke = await pop.joke()
  message.channel.send(joke)
}
})

client.login("bot token")

Biden command, 1 text input example

const pop = require('popcat-wrapper')
const Discord = require('discord.js')

const text = "String"
const img = await pop.biden(text)
const image = new Discord.MessageAttachment(img, "biden.png")
message.channel.send(image)

Pooh meme command, more than one text input example

const pop = require('popcat-wrapper')
const Discord = require('discord.js')

const text1 = "String"
const text2 = "String 2"
const img = await pop.pooh(text1, text2)
const image = new Discord.MessageAttachment(img, "pooh.png")
message.channel.send(image)

Drip command, image input example

const Discord = require("discord.js");
const pop = require('popcat-wrapper')

let user = message.mentions.users.first() || message.author
const av = user.displayAvatarURL()

const image = await pop.drip(av)

const attachment = new Discord.MessageAttachment(image, "drip.png");
message.channel.send(attachment);

Color command, object output example:

const pop = require("popcat-wrapper")

const color = "ffcc99"
const output = await pop.colorinfo(color)
console.log(output)
 /**
 {
 "hex": "#ffcc99",
 "name": "Peach Orange",
 "rgb": "rgb(255,204,153)",
 "color_image": "https://api.popcat.xyz/color/image/ffcc99",
 "brightened": "#ffe6cc"
}*/

So, if you want to collect for example the rgb, you need to:

console.log(output.rgb) (gives out the rgb value of 'ffcc99' hex.)

This method applies for Playstore, iTunes, WouldYouRather, RandomMeme, instagramUser, npm, banner, country, weather, github, quote, car, showerthoughts, lyrics and Colorinfo.

Welcome Card

const pop = require('popcat-wrapper')
const Discord = require("discord.js")
const image = await pop.welcomecard(background, avatar, text_1, text_2, text_3)
const attachment = new Discord.MessageAttachment(image, "welcomecard.png")
<Channel>.send(attachment)

Endpoints

You can get a full list of the possible API endpoints Here But here is the list:

  • joke()
  • car()
  • showerthoughts()
  • randommeme()
  • randomcolor()
  • fact()
  • _8ball()
  • drake(text1, text2)
  • pooh(text1, text2)
  • ship(image1, image2)
  • colorify(image, color_name)
  • biden(text)
  • pikachu(text)
  • oogway(text)
  • drip(image)
  • clown(image_url)
  • ad(image_url)
  • blur(image_url)
  • invert(image_url)
  • greyscale(image_url)
  • jokeoverhead(image_url)
  • mnm(image_url)
  • whowouldwin(image_url_1, image_url_2)
  • opinion(image_url, text)
  • wanted(image_url)
  • gun(image_url)
  • jail(image_url)
  • translate(text, to_language)
  • reverse(text)
  • alert(text)
  • caution(text)
  • mock(text)
  • facts(text)
  • encode(text)
  • sadcat(text)
  • lulcat(text)
  • unforgivable(text)
  • decode(binary)
  • lyrics(song)
  • subreddit(subredditName)
  • doublestruck(text)
  • texttomorse(text)
  • github(user_name)
  • weather(location_name)
  • playstore(app_name)
  • banner(discord_user_id)
  • itunes(song_name)
  • country(country_name
  • npm(package_name)
  • instagramUser(user_name)
  • colorinfo(color_hex)
  • shorten(url, extension)
  • screenshot(url)
  • steam(name)
  • imdb(moviename)
  • welcomecard(background, avatar, text_1, text_2, text_3)
  • periodicTable(element_name_symbol_or_number)

Credits

Made with by Zero Two#7177

Join Our Discord Server! Link

Install

npm i popcat-wrapper

DownloadsWeekly Downloads

551

Version

1.5.4

License

ISC

Unpacked Size

27.8 kB

Total Files

5

Last publish

Collaborators

  • popcatdevelopment