A Wrapper for vacefron.nl/api written in Python.
Project description
VACEfron.py
A Wrapper for vacefron.nl/api written in Python.
Requirements
- Python 3.6 or above
- aiohttp (python3 -m pip install -U aiohttp)
Documentation
See the full and detailed docs here
Installation
Install the package by doing one of the following commands:
Using pip (recommended):
- pip install vacefron.py -U
- python -m pip install vacefron.py -U
Changelog
See the changelog for each version here
Examples
Generate a Rank card with discord.py:
import vacefron
import json
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
vac_api = vacefron.Client()
@bot.command()
async def rank(ctx):
with open("ranks.json") as f:
ranks = json.load(f)
info = ranks[str(ctx.author.id)]
boosting = True if ctx.author.premium_since else False
gen_card = await vac_api.rank_card(
username = ctx.author,
avatar = ctx.author.avatar_url,
level = int(info['level']),
rank = int(info['rank']),
current_xp = int(info['current_xp']),
next_level_xp = 500,
previous_level_xp = 50,
is_boosting = boosting
)
rank_image = discord.File(fp = await gen_card.read(), filename = f"{ctx.author}_rank.png")
await ctx.send(f"{ctx.author.name}'s rank in {ctx.guild.name}", file = rank_image)
# is_boosting, custom_background and xp_color are optional, see more in the docs.
I can milk you meme with discord.py:
import vacefron
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
vac_api = vacefron.Client()
@bot.command()
async def icanmilkyou(ctx, face: discord.Member, cow: discord.Member):
meme = await vac_api.i_can_milk_you(face.avatar_url, cow.avatar_url)
meme_image = discord.File(fp = await meme.read(), filename = "let_me_milk_you.png")
await ctx.send(file=meme_image)
Made by
This wrapper is made by Soheab#6240, DM me on Discord or join my Server for anything related to this wrapper.
You can join VAC Efron's server here to suggests something for the API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vacefron.py-1.0.2.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for vacefron.py-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 564e37215fd92875c66e5fa5216953bfe8762c3272a9f48e085cad4ce28fb926 |
|
MD5 | ac2bb8543217fabc644bd3b8acd99b72 |
|
BLAKE2b-256 | b24c1f6e6f1c69f43cbcfdfe7366483755e091c821c3f2eb1b872aaf2ebda668 |