From f4dc5c9c95bfbc0e4b7c600c117d516e9ee21a42 Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 17 Jan 2024 05:56:11 +0200 Subject: [PATCH] add live channels in EPG --- src/discordbot/discordbot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index 3582ebc..ee92e2a 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -52,12 +52,16 @@ async def epg(ctx): global database await ctx.channel.send('epg:') if database != {}: - epg_list = "" + scheduled_list = "" + live_list = "" for key, value in database.items(): item_name = value['name'] item_start = value['start_at'] if item_start != 'now' and item_start != 'never': - epg_list += f'- {item_name} starts at {item_start}:00 UTC\n' + scheduled += f'- {item_name} starts at {item_start}:00 UTC\n' + else: + live_list += f'- {item_name} is LIVE\n' + epg_list = live_list + scheduled_list await ctx.channel.send(f'```{epg_list}```') else: await ctx.channel.send('Empty database!')