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
|
global database
|
||||||
await ctx.channel.send('epg:')
|
await ctx.channel.send('epg:')
|
||||||
if database != {}:
|
if database != {}:
|
||||||
|
epg_list = ""
|
||||||
for key, value in database.items():
|
for key, value in database.items():
|
||||||
item_name = value['name']
|
item_name = value['name']
|
||||||
item_start = value['start_at']
|
item_start = value['start_at']
|
||||||
if item_start != 'now' and item_start != 'never':
|
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:
|
else:
|
||||||
await ctx.channel.send('Empty database!')
|
await ctx.channel.send('Empty database!')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue