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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Python-discord-rankcard-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 3fb841e779ac773b95085be82a252256134104da013d78aed57053de151a616a
MD5 c210fa2162ef5fe8f5257a1099968be9
BLAKE2b-256 9fbe99e33a887d6571528163f4bfe1d564299318103cb89c60e0df412fbd5e49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Python_discord_rankcard-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0cde4bc455df7e8b84fb963ee81ab0d47d5a25d2d9818a408c79a3e1fec728f3
MD5 b847882738ab19c85b3d3f044673244c
BLAKE2b-256 61ab638dd3e6f0ed7925c5f4347fbf4ba249938d9d63198f73d8bfafda5e5bd0

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