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.4.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.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Python-discord-rankcard-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 06fbdee0b29870426bacb14953d7f171fe059487951956650f7141609d07fafa
MD5 e0ba737a2c5924ea93edd772b7651e0e
BLAKE2b-256 aa2d7a4cf82cd948556d904ed80a412d969bed953aa45727417e7b9228e77f6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Python_discord_rankcard-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b1fdb1e50192778f2028edcb89edd360614b47d239ccb3686138437e821cac87
MD5 720b24977cd9c5fc18cd0f552a957b1f
BLAKE2b-256 e778cb2a342d84fb89f6b2f6f29988fe3ffbb1f41d25fbecc90d4ef6a1cd60af

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