A wrapper designed for easy image manipulation
Project description
popcat_wrapper
Community
Join our server if you want to have fun or need any help!
Installation
pip install popcat-wrapper
Examples
Randomfacts command, no input example:
import discord
from discord.ext import commands
from popcat_wrapper import popcat_wrapper as pop
bot = commands.Bot(command_prefix=">")
@bot.command()
async def randomfacts(ctx):
res = await pop.randomfacts()
await ctx.send(res)
bot.run("discord bot token")
Pikachu command, one input example:
import discord
from discord.ext import commands
from popcat_wrapper import popcat_wrapper as pop
bot = commands.Bot(command_prefix=">")
@bot.command()
async def pikachu(ctx):
text = "String"
image = await pop.pikachu(text)
await ctx.send(image)
bot.run("discord bot token")
Drake meme command, more than one text input example:
import discord
from discord.ext import commands
from popcat_wrapper import popcat_wrapper as pop
bot = commands.Bot(command_prefix=">")
@bot.command()
async def drake(ctx):
text = "String"
text2 = "String 2"
image = await pop.drake(text, text2)
await ctx.send(image)
bot.run("discord bot token")
Ad command, image input example:
import discord
from discord.ext import commands
from popcat_wrapper import popcat_wrapper as pop
bot = commands.Bot(command_prefix=">")
@bot.command()
async def drake(ctx, member: discord.Member=None):
if member == None:
member = ctx.author
pfp = member.avatar_url_as(size=128)
image = await pop.ad(pfp)
await ctx.send(image)
bot.run("discord bot token")
Country command, object input example
from popcat_wrapper import popcat_wrapper as pop
color = "ffcc99"
res = await pop.country(name="canada")
print(res)
Output example:
{
"name": "Canada",
"domain": ".ca",
"calling_codes": "1",
"capital": "Ottawa",
"region": "Northern America",
"population": "36,155,487",
"area": "9,984,670 Square KM",
"flag": "https://api.popcatdev.repl.co/countries/canada/flag",
"currency": {
"short": "CAD",
"name": "Canadian dollar",
"symbol": "$"
}
}
If you want to get data from a specific property (for example domain), you need to replace pop.country(name="canada")
with pop.country(name="canada", property="domain")
. You may have noticed that there is a sub object within the main one, you may ask "How do i get data from a property inside the sub object?"; here's how:
You use pop.country(name="canada", property="currency.propertyname")
.
For example: pop.country(name="canada", property="currency.symbol")
.
This method applies to Playstore, iTunes, WouldYouRather, RandomMeme, instagramUser, car, npm, banner, country, weather, github and Colorinfo.
Welcome card
import discord, aiohttp, asyncio
from discord.ext import commands
from popcat_wrapper import popcat_wrapper as pop
bot = commands.Bot(command_prefix=">")
@bot.command()
async def welcomecard(ctx):
image = await pop.welcomecard(background,text1,text2,text3,)
await ctx.send(image)
bot.run("discord bot token")
Endpoints
You can get a full list of the possible API endpoints Here But here is the list:
drake(text1, text2)
pooh(text1, text2)
ship(image1, image2)
colorify(image, color)
biden(text)
pikachu(text)
drip(image)
clown(image)
ad(image)
blur(image)
invert(image)
greyscale(image)
jokeoverhead(image)
mnm(image)
translate(text, language)
reverse(text)
alert(text)
caution(text)
mock(text)
facts(text)
encode(text)
decode(binary)
doublestruck(text)
texttomorse(text)
playstore(app, property)
itunes(song, property)
npm(name, property)
instagramUser(user, property)
car(property)
colorinfo()
welcomecard(background, text1, text2, text3, avatar)
joke()
randommeme()
fact()
_8ball()
wanted(image)
simp(image)
lulcat(text)
weather(location, property)
opinion(image, text)
pet(image)
url_shortener(url, extension)
screenshot(url)
github(user, property)
whowouldwin(image1, image2)
Credits
Made with <3 (and python) by reset#0002 and NotFaizen#2005
Join Our Discord Server! Link
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file popcat_wrapper-1.6-py3-none-any.whl
.
File metadata
- Download URL: popcat_wrapper-1.6-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de6db004b500e057fc7febc686b9ed94c8ebee44c6d46ab389d072bb2b4b1d51 |
|
MD5 | 1f9c7d4b53471d68be7d9abec219c07a |
|
BLAKE2b-256 | 86d62176b5b92101f0804e39e0f9866a99a9bcd28907e7b70f34428e8aec3e60 |