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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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