transitous rewrite: /info improvements

This commit is contained in:
Kaaninchen
2026-08-16 23:29:03 +02:00
parent 36a1db0647
commit 27f8ef2cbc
3 changed files with 7 additions and 11 deletions
+3 -7
View File
@@ -35,21 +35,17 @@ def build_info_embed() -> discord.Embed:
stops = trip["stops"]
next_stop = get_next_station(trip["stops"])
next_stop_text = ""
print(f"next_stop: {next_stop}")
next_stop_station = None
if next_stop:
print("next_stop")
next_stop_station = next_stop.get("name")
next_stop_text = f". Nächster Halt: **{next_stop_station}**"
via = format_via_list(stops)
if via:
via += next_stop_text
embed.add_field(name="Über", value=via, inline=False)
else:
if next_stop:
embed.add_field(name="Nächster Halt", value=next_stop_station, inline=False)
if next_stop:
embed.add_field(name="Nächster Halt", value=f"__{next_stop_station}__", inline=False)
route_fields = format_stop_list(stops, next_stop_station)
for field_name, field_value in route_fields: