Adding all other classes to the embed
This commit is contained in:
parent
416c15fdc5
commit
4059240816
17
app/ffxiv.py
17
app/ffxiv.py
@ -38,7 +38,7 @@ def make_request(name, server):
|
||||
current_class_name = current_class['Job']['Name']
|
||||
current_class_level = character['ActiveClassJob']['Level']
|
||||
xp_to_level_up = current_class['ExpLevelTogo']
|
||||
class_icon = "https://xivapi.com/%s" % current_class['Job']['Icon']
|
||||
job_icon = "https://xivapi.com/%s" % current_class['Job']['Icon']
|
||||
|
||||
if character['GrandCompany']['Company']:
|
||||
grand_company = character['GrandCompany']
|
||||
@ -56,7 +56,7 @@ def make_request(name, server):
|
||||
|
||||
embed = discord.Embed(description=character['Name'], color=0x428bca, type="rich")
|
||||
embed.set_author(name="FFXIV API bullshit for %s\nPlayer ID: %s" % (character['Name'], character['ID']), icon_url="http://na.lodestonenews.com/images/thumbnail.png")
|
||||
embed.set_thumbnail(url=class_icon)
|
||||
embed.set_thumbnail(url=job_icon)
|
||||
embed.add_field(name="Current Class", value="%s - Lvl: %s" % (current_class_name, current_class_level), inline=True)
|
||||
embed.add_field(name="XP to level up", value=xp_to_level_up, inline=True)
|
||||
embed.add_field(name="Race", value=character['Race']['Name'], inline=True)
|
||||
@ -80,9 +80,16 @@ def make_request(name, server):
|
||||
)
|
||||
else:
|
||||
embed.add_field(name="Free Company", value="Not in a Free Company", inline=False)
|
||||
|
||||
embed.set_image(url=character['Portrait'])
|
||||
embed.add_field(name="All other classes", value="-----", inline=False)
|
||||
all_classes = character['ClassJobs']
|
||||
for job in all_classes:
|
||||
job_icon = "https://xivapi.com%s" % job['Job']['Icon']
|
||||
embed.add_field(
|
||||
name=job['Job']['Abbreviation'],
|
||||
value=job['Level'], inline=True
|
||||
)
|
||||
|
||||
embed.set_footer(text='Feel free to use my refer a friend code: MA9Q49CJ')
|
||||
# embed.add_field(name=':hospital: Recovered Cases :hospital:', value=recovered, inline=False)
|
||||
# embed.add_field(name=':skull_crossbones: Deaths :skull_crossbones:', value=deaths, inline=False)
|
||||
# embed.add_field(name='Source', value='https://github.com/CSSEGISandData/COVID-19')
|
||||
return embed
|
||||
|
Loading…
x
Reference in New Issue
Block a user