A simple discord rank card written in python.
Project description
Python-discord-rankcard
Installation
pip install Python-discord-rankcard
Usage
import discord
from discord.ext import commands
from Rankcard import Main
class Rank(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.rankcard = Main.RANKCARD()
@commands.command()
async def rank(self, ctx):
card = self.rankcard.rank_card(
username=ctx.author.name, # user name
avatar= ctx.author.avatar_url,
level=1, # user level
rank=1, # user rank
current_xp=0, # user xp
custom_background= "#000000", # background colour
xp_color="#FF7A7A", # Foreground colour
next_level_xp=100) # Next level xp
file = discord.File(card)
await ctx.send(file=file)
def setup(bot):
bot.add_cog(Rank(bot))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Python-discord-rankcard-0.0.3.tar.gz.
File metadata
- Download URL: Python-discord-rankcard-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b692faeecf44fda418deffc21c47cb4c6a47b6038b71c0272465cdf300117bbd
|
|
| MD5 |
3f1c92fdfaa4feb03f4bdfd99dfa8d2d
|
|
| BLAKE2b-256 |
214cc7acb20c39e799400d7f760abcc27dd4ddad719b8a0fa48f35dcf70bc6d4
|
File details
Details for the file Python_discord_rankcard-0.0.3-py3-none-any.whl.
File metadata
- Download URL: Python_discord_rankcard-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e32b5b3ba524015d523ac381b5a24bec2b88accb084449cfae77aae47b3581
|
|
| MD5 |
fa77bf8af4d9541d647fb49cbe94c7cf
|
|
| BLAKE2b-256 |
dd73c4cc40ed3f07552309fa52eccff2983a47f236c0c0bd057e6b1cb7b4d117
|