set annoncement trigger

This commit is contained in:
deflax 2024-01-17 04:28:27 +02:00
parent 7dcac2f191
commit 26b413725f

View file

@ -75,12 +75,10 @@ async def update_database():
if database != {}: if database != {}:
for key, value in database.items(): for key, value in database.items():
name = value['name'] name = value['name']
start_at = value['start_at'] start_at = value['start_at']
logger_discord.info(name)
logger_discord.info(start_at)
if start_at == 'now': if start_at == 'now':
logger_discord.info(f'{name} live stream detected!') logger_discord.info(f'{name} live stream detected!')
scheduler.add_job(func=announce_live_channel, seconds=60, id='announce_live_channel', args=(name)) scheduler.add_job(func=announce_live_channel, trigger='interval', seconds=60, id='announce_live_channel', args=(name))
return return
try: try: