I'm trying to do the rank command which I did but I don't know how to create the card image. I tried to use PIL but as I read it is dead and I have not found anything new. How could I do now? There is no tutorial with discord.py
@client.command() async def rank(ctx, member: discord.Member): #Qui definiamo tutte le variabili cursor = levelsystem_db.cursor() cursor.execute(f"SELECT user_xp FROM users WHERE client_id = {str(member.id)}") user_xp = cursor.fetchall() xp = user_xp[0][0] cursor.execute(f"SELECT user_level FROM users WHERE client_id = {str(member.id)}") user_level = cursor.fetchall() lvl = user_level[0][0] cursor.execute(f"SELECT xp_level FROM levels WHERE level = {lvl + 1}") xp_level = cursor.fetchall() next_xp = xp_level[0][0] await ctx.send(f"Livello: **{lvl}**\nEsperienza: **{xp}|{next_xp}**") https://stackoverflow.com/questions/65963960/rank-card-on-discord-py January 30, 2021 at 10:08AM
没有评论:
发表评论