Skip to main content

A Python Version of Canvacord

Project description

Discord PyPi Python

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 a Rank Card

import discord
from discord.ext import commands
from canvacord.rankcard import rankcard

client = commands.Bot(command_prefix="!")

@client.comand()
async def test(ctx):
    user = ctx.author
    username = ctx.author.name + "#" + ctx.author.discriminator
    currentxp = 1
    lastxp = 0
    nextxp = 2
    level = 1
    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.run("BOT_TOKEN")

Links

Downloads

Downloads Downloads Downloads

Project details


Release history Release notifications | RSS feed

This version

0.1.4

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.4.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

canvacord-0.1.4-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page