Поправил формат сообщения, увеличил период опроса

This commit is contained in:
lulzette 2022-12-14 21:49:43 +03:00
parent 5f2ddd09e6
commit 786302d3cb

View File

@ -9,8 +9,6 @@ import os
import sys import sys
import telebot import telebot
import main
streamer = config_python.streamer streamer = config_python.streamer
app_id = config_python.appid app_id = config_python.appid
app_secret = config_python.appsecret app_secret = config_python.appsecret
@ -27,7 +25,9 @@ def stream_message_worker(data: dict):
stream_title = data['title'] stream_title = data['title']
stream_viewers = str(data['viewer_count']) stream_viewers = str(data['viewer_count'])
# Готовим сообщение # Готовим сообщение
message = streamer + " стримит " + game_name + " Title: " + stream_title + " Зрителей: " + stream_viewers message = stream_title + '\n' + \
"Игра: " + game_name + '\n' + \
"Зрителей: " + stream_viewers
log.info(message) log.info(message)
# Если файл с айди существует, читаем его и редактируем сообщение из него # Если файл с айди существует, читаем его и редактируем сообщение из него
if os.path.exists('msgid'): if os.path.exists('msgid'):
@ -130,4 +130,4 @@ if __name__ == '__main__':
while True: while True:
check_alive() check_alive()
time.sleep(180) time.sleep(300)