Skip to main content

DiscordLevelingCard

A library with Rank cards for your discord bot.

card preview

card1

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

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))

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discordlevelingcard-0.1.7.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discordlevelingcard-0.1.7-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file discordlevelingcard-0.1.7.tar.gz.

File metadata

  • Download URL: discordlevelingcard-0.1.7.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.4 Windows/10

File hashes

Hashes for discordlevelingcard-0.1.7.tar.gz
Algorithm Hash digest
SHA256 07cce4518807fa33fa217a1173728eb7c8bf72f06b28c593ea5db4a0e19295c6
MD5 d03a3b9c9098d9e8c339587aa7e0d18b
BLAKE2b-256 d0a5eae35881648076409026a158c6704233d71adebb12d1556ae401615c24e3

See more details on using hashes here.

File details

Details for the file discordlevelingcard-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for discordlevelingcard-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8d0dad42f1b1912b5758381b0f95e945f93337343a3d9ca0659d8f264ab7df
MD5 2c2ee3e8cddf5d55fd87b9b2a505a039
BLAKE2b-256 c0a063d6cc0b45ea4031679fd32342c7fdd860e5f4f932420a6db4199aaa85d8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.1

2 files

0.5.0

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.3.1

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page