notify: Telegram token/chatid 直接硬编码

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jackyu66git
2026-05-26 14:45:41 +08:00
co-authored by Claude Opus 4.7
parent 8eb50e3eae
commit c75d5e11fc
+2 -12
View File
@@ -10,18 +10,8 @@ import requests
logger = logging.getLogger(__name__)
_HERMES_ENV = os.path.expanduser("~/.hermes/.env")
BOT_TOKEN = ""
CHAT_ID = ""
if os.path.exists(_HERMES_ENV):
with open(_HERMES_ENV) as f:
for line in f:
line = line.strip()
if line.startswith("TELEGRAM_BOT_TOKEN="):
BOT_TOKEN = line.split("=", 1)[1]
elif line.startswith("TELEGRAM_ALLOWED_USERS="):
CHAT_ID = line.split("=", 1)[1]
BOT_TOKEN = "8742822093:AAGzD1vS7ru7ROhgcOjA-UyHb4R8Cfcqv3Q"
CHAT_ID = "580807463"
# 持久化去重文件
_PUSHED_FILE = os.path.expanduser("~/.hermes/bsp_pushed.json")