An easy-to-use Python Wrapper for the AlexFlipnote API
For any questions and support, you can join the AlexFlipnote server
To begin with, you'll have to install the package by doing one of the following commands:
pip install -U alexflipnote.py
python -m pip -U install alexflipnote.py
After that, you will have to create the client:
import alexflipnote
alex_api = alexflipnote.Client()
For future reference in this documentation: when referring to 'alex_api' we refer to that above.
All available methods and classes that are available in the wrapper are listed below.
- achivement
- birb (alias: bird)
- calling
- captcha
- cats (alias: cat)
- challenge
- close
- coffee
- colour (alias: color)
- did_you_mean (alias: didyoumean)
- dogs
- drake
- facts
- nft
- pornhub (alias: ph)
- sadcat
- scroll
- sillycat
- support_server
See here some examples
import asyncio
import alexflipnote
alex_api: alexflipnote.Client = alexflipnote.Client()
async def get_cat() -> None:
url = await alex_api.cat()
print(url)
await alex_api.close() # preventing the "Unclosed client session" warning.
asyncio.run(get_cat())
Get a phub logo using discord.py:
from discord.ext import commands
import alexflipnote
bot = commands.Bot("!")
# just a example, the client doesn't have to be under bot
alex_api = alexflipnote.Client()
@bot.command(aliases=["ph"])
async def phublogo(ctx, *, texts: str):
white, yellow = texts.split(" | ")
url = await alex_api.phub(white, yellow)
await ctx.send(f"Requested by {ctx.author}\n{url}")
# invoke: !ph Epic Gamer | Moment
bot.run("TOKEN")