A Python Version of Canvacord
Project description
A copy of canvacord made in python!
Installation
Run any of these commands in terminal:
Mac / Linux
pip install canvacord
Windows
python -m pip install canvacord
Examples
💡 This library requires discord.py.
Creating Images
import discord
from discord.ext import commands
from canvacord import rankcard, trigger
client = commands.Bot(command_prefix="!")
@client.comand()
async def rankcard(ctx):
user = ctx.author
username = ctx.author.name + "#" + ctx.author.discriminator
currentxp = 1
lastxp = 0
nextxp = 2
current_level = 1
current_rank = 1
background = None
image = await rankcard(user=user, username=username, currentxp=currentxp, lastxp=lastxp, nextxp=nextxp, level=current_level, rank=current_rank, background=background)
file = discord.File(filename="rankcard.png", fp=image)
await ctx.send(file=file)
@client.comand()
async def triggered(ctx):
user = ctx.author
image = await trigger(user)
file = discord.File(filename="triggered.gif", fp=image)
await ctx.send(file=file)
client.run("BOT_TOKEN")
Links
Downloads
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
canvacord-0.1.16.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for canvacord-0.1.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8018659928f0f913818d8ddeab373a7d07b63aebee03155a92fea526b52c4a26 |
|
MD5 | 072e87df4c3ea1a8ce9c7b0094f8c2cf |
|
BLAKE2b-256 | 6af8974426cb72e8798c35f75a8eba61c7dfa71dc522082640f3d4627ae1d244 |