Cleaning up some stuff and also adding the items uuid as a variable when using /ship, not sure what to do with it yet
This commit is contained in:
parent
a5a2685b36
commit
cf563ed6c9
@ -235,7 +235,7 @@ class StarCitizen(commands.Cog):
|
||||
latest_incident.find_next("div", class_="issue no-underline")
|
||||
.get("onclick")
|
||||
.split("=")[-1]
|
||||
.replace("\\", "")
|
||||
.replace("\\", "").replace("'", "")
|
||||
)
|
||||
|
||||
details = latest_incident.findNext("span", {"class": "issue__content"}).text
|
||||
|
@ -230,6 +230,15 @@ async def get_ship(ship_name):
|
||||
|
||||
embed.set_image(url=ship_image)
|
||||
|
||||
try:
|
||||
item_uuid = (
|
||||
soup.find("div", {"class": "infobox__label"}, string="UUID")
|
||||
.findNext("div", {"class": "infobox__data"})
|
||||
.text
|
||||
)
|
||||
except Exception:
|
||||
item_uuid = "N/A"
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
embed = discord.Embed(description="❌", color=discord.Color.red(), type="rich")
|
||||
|
Loading…
x
Reference in New Issue
Block a user