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.18.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file canvacord-0.1.18.tar.gz
.
File metadata
- Download URL: canvacord-0.1.18.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d6ae68213149107bd1156674c254e0353ac1d32038ec694200f92be3667bf2 |
|
MD5 | 6a851c8dcf20fe7556a8a551c02a25f6 |
|
BLAKE2b-256 | 529ac948de718a783f84410b22f0c3aed578cca980429f8a334686fdb01ab527 |
File details
Details for the file canvacord-0.1.18-py3-none-any.whl
.
File metadata
- Download URL: canvacord-0.1.18-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c20b0dbca29b86ddde66cf4867f23560d722ffbceec9a31fa387e15ed60d14bb |
|
MD5 | 722af188ba61a17183108dbd920de62c |
|
BLAKE2b-256 | 9f3c3578579ebcb6e7082b5370d9d0f2ee67cc611e8a84300f67f22cdfda9ec4 |