bots

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8391c3b25bbad94fe302b9695b0294eab4c420a4
parent 091b6b37f39706906a257d0a2dce039f953e8a27
Author: Nathaniel Chappelle <nathaniel@chappelle.dev>
Date:   Thu,  5 Feb 2026 20:44:24 -0800

adding logging

Diffstat:
M.gitignore | 1+
Mlisten-page-bot/bot.py | 6++++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ .env *venv +bot_debug.log diff --git a/listen-page-bot/bot.py b/listen-page-bot/bot.py @@ -1,4 +1,5 @@ import os +import sys import subprocess import requests import frontmatter @@ -17,6 +18,11 @@ MAX_SONGS = 9 # Conversation states TITLE, ARTIST, LINK, COVER = range(4) +sys.stdout = open('/home/_listen-bot/bots/listen-page-bot/bot_debug.log', 'a', buffering=1) +sys.stderr = sys.stdout + +print("--- Bot started ---") + async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): await update.message.reply_text("Let's add a new song! What is the Song Title?") return TITLE