A library with leveling cards for your discord bot.
Project description
DiscordLevelingCard
A library with Rank cards for your discord bot.
card preview
card1
installation
for pypi version
pip install discordlevelingcard
for github developement version
pip install git+https://github.com/ResetXD/DiscordLevelingCard
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
since no path was given, it returns bytes which can directly be used in discord.py and its fork 's File class.
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=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
Close
Hashes for discordlevelingcard-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da35f60ee7bc0889bf021ba070fdecce566408c65a970da4e8e91bb07047311 |
|
MD5 | 9a155b716dc7a1ee9fea66d23326e61d |
|
BLAKE2b-256 | b46d371116425dfc375d4f4b6972f4831bfd79e290ed20fe226fe3ea4ba6045e |
Close
Hashes for discordlevelingcard-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e88260f2b9804148875f4f0625234956b44abe7f6e1dd5dd268624a78b41a7 |
|
MD5 | 615db8192af19f7cd0f972ffeb64e57e |
|
BLAKE2b-256 | 13ed12af195fc569e46fe57979e044fcbaff52eacd027b79e675f095fda54bf6 |