From 8010861107ee23a2f0378d1a463fdc3659343973 Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 17 Jan 2024 05:51:35 +0200 Subject: [PATCH] modify epglist format --- src/discordbot/discordbot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index b6f3916..5ab095e 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -52,11 +52,13 @@ async def epg(ctx): global database await ctx.channel.send('epg:') if database != {}: + epg_list = "" for key, value in database.items(): item_name = value['name'] item_start = value['start_at'] if item_start != 'now' and item_start != 'never': - await ctx.channel.send(f'{item_name} starts at {item_start}h UTC') + epg_list += f'{item_name} starts at {item_start}h UTC\n') + await ctx.channel.send(f'``` {epg_list} ```') else: await ctx.channel.send('Empty database!')