Initial pass at a /rsifind command

This commit is contained in:
Luke Robles 2023-12-22 10:53:40 -08:00
parent a65deba714
commit 33da5cbc7a

View File

@ -61,12 +61,9 @@ async def rsi_find(player):
description="-------",
color=discord.Color.blue(),
type="rich",
title="[%s's Star Citizen Information](%s)"
% (
response["data"]["profile"]["page"]["url"],
response["data"]["profile"]["handle"],
),
title="%s's Star citizen information" % response["data"]["profile"]["handle"],
)
embed.add_field(
name="Link to profile",
value=response["data"]["profile"]["page"]["url"],
@ -74,18 +71,19 @@ async def rsi_find(player):
)
embed.add_field(
name="Enlisted",
value=response["data"]["profile"]["enlisted"],
value=response["data"]["profile"]["enlisted"].split("T")[0],
inline=False,
)
embed.set_author(
name=response["data"]["profile"]["badge"],
icon_url=response["data"]["profile"]["badge_image"],
url=response["data"]["profile"]["page"]["url"],
)
embed.set_thumbnail(url=response["data"]["profile"]["image"])
embed.add_field(name="-------", value="", inline=False)
if response["data"]["organization"]["name"]:
if "name" in response["data"]["organization"]:
embed.add_field(
name="Org Info",
value=response["data"]["organization"]["name"],