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,10 +138,10 @@ async def query_database():
|
|||
if live_channel_id != 0:
|
||||
live_channel = bot.get_channel(int(live_channel_id))
|
||||
if rechead != {}:
|
||||
await live_channel.send('Live stream is now offline.')
|
||||
rec_stream_name = rechead['name']
|
||||
video_filename = rechead['video']
|
||||
thumb_filename = rechead['thumb']
|
||||
# Reset the rechead
|
||||
rechead = {}
|
||||
|
||||
# Creating an embed
|
||||
|
@ -165,6 +165,7 @@ async def query_database():
|
|||
icon_url=f'{img_url}/logo-96.png')
|
||||
# Sending the embed to the channel
|
||||
await live_channel.send(embed=embed)
|
||||
logger_discord.info(f'{rec_stream_name} is now offline. VOD: {video_filename}')
|
||||
else:
|
||||
logger_discord.info('Live stream is now offline.')
|
||||
|
||||
|
|
Loading…
Reference in a new issue