From c11d3245881462be16d8324a9ab3a2f5d2f6ae84 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 18 Oct 2019 12:34:30 +0200 Subject: [PATCH] Added station name in first message the name is parsed from the first departure information --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 15e0a87..18a41f8 100644 --- a/bot.py +++ b/bot.py @@ -112,7 +112,7 @@ def get_vvs_departures(query): request = requests.get("https://efa-api.asw.io/api/v1/station/" + query.station_id + "/departures") if request.status_code != 200: raise ServerCommunicationError - reply.append("Next departures:") + reply.append("Next departures for station: " + request.json()[0]['stopName']) printed_departures = 0 for station in request.json(): if station['direction'].casefold().find(query.destination) != -1 or station['direction'].find(