Skip to main content

A simple discord rank card written in python.

Project description

Python-discord-rankcard

img

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

Python-discord-rankcard-0.0.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

Python_discord_rankcard-0.0.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file Python-discord-rankcard-0.0.5.tar.gz.

File metadata

  • Download URL: Python-discord-rankcard-0.0.5.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

Hashes for Python-discord-rankcard-0.0.5.tar.gz
Algorithm Hash digest
SHA256 272c34c2539a02cdaa23f4bfe7e7024c959b1762cda28cb39a3144826eca7697
MD5 bc748daab4f1cd9ee37d47f084ab4f82
BLAKE2b-256 17ec2ecff6220714073b5fd6feda98fb0677ea4392495f8b18a0c8e23a961b6c

See more details on using hashes here.

File details

Details for the file Python_discord_rankcard-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: Python_discord_rankcard-0.0.5-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

Hashes for Python_discord_rankcard-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 35290b76cdcadc7747a6b67159b3dee069790c241abd03c7ed26082179d0fab8
MD5 df30daaa97056daa15519571477322c1
BLAKE2b-256 1bdf4cd7bdb7c80d050627eb25297805198d722fbb70d37ec65f862f0be7803b

See more details on using hashes here.

Supported by

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