show live list in epg if live chans exist

This commit is contained in:
deflax 2024-01-17 06:09:09 +02:00
parent 0c54776541
commit a672b0a3a8

View file

@ -61,10 +61,11 @@ async def epg(ctx):
scheduled_list += f'- {item_name} starts at {item_start}:00 UTC\n' scheduled_list += f'- {item_name} starts at {item_start}:00 UTC\n'
else: else:
live_list += f'- {item_name} is LIVE\n' live_list += f'- {item_name} is LIVE\n'
epg_list = live_list + scheduled_list await ctx.channel.send(f'```{scheduled_list}```')
await ctx.channel.send(f'```{epg_list}```') if live_list != "":
await ctx.channel.send(f'```{live_list}```')
else: else:
await ctx.channel.send('`Empty database!`') await ctx.channel.send('```Empty database!```')
@bot.command(name='time') @bot.command(name='time')
async def time(ctx): async def time(ctx):