A library with leveling cards for your discord bot.
Project description
DiscordLevelingCard
A library with Rank cards for your discord bot.
card preview
card1
How To Use
If you don't provide path then the method will return bytes which can directly be used in discord.py/disnake/pycord/nextcord 's File class.
Example
from disnake.ext import commands
from DiscordLevelingCard import RankCard
import disnake
client = commands.Bot()
@client.slash_command(name="rank")
async def user_rank_card(ctx, user:disnake.Member):
await ctx.response.defer()
a = RankCard(
background="./my_cool_background.png",
avatar=user.display_avatar.url,
level=1,
current_exp=1,
max_exp=1,
username="cool username",
type="disnake"
)
image = await a.card1()
await ctx.edit_original_message(file=image)
or you can use no type
@client.slash_command(name="rank")
async def user_rank_card(ctx, user:disnake.Member):
await ctx.response.defer()
a = RankCard(
background=user.banner.url,
avatar=user.display_avatar.url,
level=1,
current_exp=1,
max_exp=1,
username="cool username"
)
image = await a.card1()
await ctx.edit_original_message(file=disnake.File(image))
if you want to use path
@client.slash_command(name="rank")
async def user_rank_card(ctx, user:disnake.Member):
await ctx.response.defer()
a = RankCard(
background=user.banner.url,
avatar=user.display_avatar.url,
level=1,
current_exp=1,
max_exp=1,
username="cool username",
bar_color="red",
text_color="white",
path="./user_cards/rank_card.png"
)
# image return the path provided i.e. "./user_cards/rank_card.png"
image = await a.card1()
await ctx.edit_original_message(file=disnake.File(image))
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
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 discordlevelingcard-0.1.6.tar.gz.
File metadata
- Download URL: discordlevelingcard-0.1.6.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44aea0403117a2049677655472d49fee111a04d179040d806327feb521caeb04
|
|
| MD5 |
903d482ca652baad3fde959263ae9255
|
|
| BLAKE2b-256 |
7739a83fd5baaec05a0f05565c70edb0d56815f610227709ab8e6980cb50db75
|
File details
Details for the file discordlevelingcard-0.1.6-py3-none-any.whl.
File metadata
- Download URL: discordlevelingcard-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45066bac5d2fa064408b41d0ca52e3f9779760a0df96733842ad2e96e5d68257
|
|
| MD5 |
24847e5311d322198eedd1607b67300b
|
|
| BLAKE2b-256 |
db08e4ea0836aefc5023977a6f13365cdb5d5189ec4dbca884a48a3596a3d173
|