Skip to main content

A lib

Project description

Disrank

A lib to make good looking discord profile card

Usage

from disrank.generator import Generator

args = {
	'bg_image' : '', # Background image link 
	'profile_image' : '', # User profile picture link
	'level' : 1, # User current level 
	'current_xp' : 0, # Current level minimum xp 
	'user_xp' : 10, # User current xp
	'next_xp' : 100, # xp required for next level
	'user_position' : 1, # User position in leaderboard
	'user_name' : 'Name#0001', # user name with descriminator 
	'user_status' : 'online', # User status eg. online, offline, idle, streaming, dnd
}

image = Generator().generate_profile(**args)

# In a discord command
file = discord.File(fp=image, filename='image.png')
await ctx.send(file=file)

Make sure to run the generate part in an executor. Any help need Join here

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

disrank-0.0.2.tar.gz (135.7 kB view details)

Uploaded Source

Built Distribution

disrank-0.0.2-py2.py3-none-any.whl (135.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file disrank-0.0.2.tar.gz.

File metadata

  • Download URL: disrank-0.0.2.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

File hashes

Hashes for disrank-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5b190345cb641559d99ba1564f8fc019a3f8ab9a6385467eff43779105bfabec
MD5 fa421850842eb0dabd749ae21a30be0b
BLAKE2b-256 53ba12892282ad646e82460b1000723de2921e41bd512ea5b6dfd97bfeff784b

See more details on using hashes here.

File details

Details for the file disrank-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: disrank-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 135.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

File hashes

Hashes for disrank-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3dc32aaa05e53c95d4bee087763583136ca7d1a4ad6181188c976391fc82cbde
MD5 74346d2ebf97bc375940c7a3ac5f7e14
BLAKE2b-256 33292edfb26d48ed8d64f5b6a52013c42256db3b2b6c7f6e94bcd3ae96d2bd6f

See more details on using hashes here.

Supported by

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