mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-07-21 19:52:47 +00:00
Umgang mit mehreren Operator Einträgen verbessert
This commit is contained in:
+2
-3
@@ -2,7 +2,7 @@ import random
|
||||
import discord
|
||||
from datetime import datetime, timedelta
|
||||
import src.handlers as handlers
|
||||
from src.utils import operator_metadata, format_via_list, logger
|
||||
from src.utils import operator_metadata, format_via_list, resolve_operator, logger
|
||||
|
||||
def format_timestamp(timestr):
|
||||
parsed_time = datetime.strptime(timestr, "%H:%M")
|
||||
@@ -30,8 +30,7 @@ def build_info_embed() -> discord.Embed | None:
|
||||
conn = handlers.current
|
||||
info = handlers.train_info
|
||||
|
||||
current_operator = info["operators"][0]
|
||||
|
||||
current_operator = resolve_operator(info["operators"])
|
||||
arrival = format_iso_timestamp(info["arrival"])
|
||||
departure = format_timestamp(conn['departure'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user