Ajout de la gestion des informations de stream dans le bot Twitch. Implémentation de la fonction de remplacement des variables de commande pour inclure des informations dynamiques telles que le titre du stream, le nom du jeu, le nombre de viewers et l'uptime. Mise à jour de l'interface utilisateur pour afficher ces informations en temps réel dans la modération Twitch.
This commit is contained in:
@@ -67,9 +67,15 @@ async def checkOnlineStreamer(twitch: Twitch) :
|
||||
if main_stream:
|
||||
webapp.config["BOT_STATUS"]["twitch_is_live"] = True
|
||||
webapp.config["BOT_STATUS"]["twitch_viewer_count"] = getattr(main_stream, 'viewer_count', 0)
|
||||
webapp.config["BOT_STATUS"]["twitch_stream_title"] = getattr(main_stream, 'title', '') or ''
|
||||
webapp.config["BOT_STATUS"]["twitch_game_name"] = getattr(main_stream, 'game_name', '') or ''
|
||||
webapp.config["BOT_STATUS"]["twitch_started_at"] = main_stream.started_at.isoformat() if getattr(main_stream, 'started_at', None) else None
|
||||
else:
|
||||
webapp.config["BOT_STATUS"]["twitch_is_live"] = False
|
||||
webapp.config["BOT_STATUS"]["twitch_viewer_count"] = 0
|
||||
webapp.config["BOT_STATUS"]["twitch_stream_title"] = ""
|
||||
webapp.config["BOT_STATUS"]["twitch_game_name"] = ""
|
||||
webapp.config["BOT_STATUS"]["twitch_started_at"] = None
|
||||
|
||||
# Premier check : synchronisation sans notification
|
||||
if _live_alert_first_check:
|
||||
|
||||
Reference in New Issue
Block a user