Fix issue with un-buyable ships causing the bot to error
This commit is contained in:
parent
6178aa19a2
commit
58a5536c1f
0
app/bot.py
Normal file → Executable file
0
app/bot.py
Normal file → Executable file
0
app/cogs/actual_utils.py
Executable file → Normal file
0
app/cogs/actual_utils.py
Executable file → Normal file
0
app/cogs/stable_diffusion.py
Normal file → Executable file
0
app/cogs/stable_diffusion.py
Normal file → Executable file
0
app/requirements.txt
Normal file → Executable file
0
app/requirements.txt
Normal file → Executable file
25
app/star_citizen.py
Normal file → Executable file
25
app/star_citizen.py
Normal file → Executable file
@ -105,19 +105,22 @@ async def get_ship(ship_name):
|
||||
inline=True,
|
||||
)
|
||||
|
||||
buy_location = (
|
||||
soup.find("span", {"id": "Universe_availability"})
|
||||
.findNext("tbody")
|
||||
.find_all("td", {"class", "Location smwtype_wpg"})
|
||||
)
|
||||
|
||||
if len(buy_location):
|
||||
embed.add_field(
|
||||
name="**Buyable At**",
|
||||
value=", ".join(str(x.text) for x in buy_location),
|
||||
inline=True,
|
||||
try:
|
||||
buy_location = (
|
||||
soup.find("span", {"id": "Universe_availability"})
|
||||
.findNext("tbody")
|
||||
.find_all("td", {"class", "Location smwtype_wpg"})
|
||||
)
|
||||
|
||||
if len(buy_location):
|
||||
embed.add_field(
|
||||
name="**Buyable At**",
|
||||
value=", ".join(str(x.text) for x in buy_location),
|
||||
inline=True,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
embed.add_field(name="-------", value="", inline=False)
|
||||
try:
|
||||
cargo_capacity = (
|
||||
|
0
app/stock.py
Normal file → Executable file
0
app/stock.py
Normal file → Executable file
0
argocd-application.yaml
Normal file → Executable file
0
argocd-application.yaml
Normal file → Executable file
0
helm/values.yaml
Normal file → Executable file
0
helm/values.yaml
Normal file → Executable file
0
test-dragon-bot.sh
Normal file → Executable file
0
test-dragon-bot.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user