modify epglist format
This commit is contained in:
parent
9f6ae93762
commit
8010861107
1 changed files with 3 additions and 1 deletions
|
@ -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!')
|
||||
|
||||
|
|
Loading…
Reference in a new issue