log the offline announcement in discordbot logger
This commit is contained in:
parent
937a6477c1
commit
b75e7e658b
1 changed files with 3 additions and 2 deletions
|
@ -138,12 +138,12 @@ async def query_database():
|
||||||
if live_channel_id != 0:
|
if live_channel_id != 0:
|
||||||
live_channel = bot.get_channel(int(live_channel_id))
|
live_channel = bot.get_channel(int(live_channel_id))
|
||||||
if rechead != {}:
|
if rechead != {}:
|
||||||
await live_channel.send('Live stream is now offline.')
|
|
||||||
rec_stream_name = rechead['name']
|
rec_stream_name = rechead['name']
|
||||||
video_filename = rechead['video']
|
video_filename = rechead['video']
|
||||||
thumb_filename = rechead['thumb']
|
thumb_filename = rechead['thumb']
|
||||||
|
# Reset the rechead
|
||||||
rechead = {}
|
rechead = {}
|
||||||
|
|
||||||
# Creating an embed
|
# Creating an embed
|
||||||
video_url = f'https://{scheduler_hostname}/video/{video_filename}'
|
video_url = f'https://{scheduler_hostname}/video/{video_filename}'
|
||||||
thumb_url = f'https://{scheduler_hostname}/thumb/{thumb_filename}'
|
thumb_url = f'https://{scheduler_hostname}/thumb/{thumb_filename}'
|
||||||
|
@ -165,6 +165,7 @@ async def query_database():
|
||||||
icon_url=f'{img_url}/logo-96.png')
|
icon_url=f'{img_url}/logo-96.png')
|
||||||
# Sending the embed to the channel
|
# Sending the embed to the channel
|
||||||
await live_channel.send(embed=embed)
|
await live_channel.send(embed=embed)
|
||||||
|
logger_discord.info(f'{rec_stream_name} is now offline. VOD: {video_filename}')
|
||||||
else:
|
else:
|
||||||
logger_discord.info('Live stream is now offline.')
|
logger_discord.info('Live stream is now offline.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue