make TSSBOT/start_bot.py a real Discord bot and reuse SREBOT venv (#1227)

- TSSBOT/start_bot.py: replace the print-and-idle stub with a minimal
  discord.py Client (commands.Bot with default+message_content intents).
  Loads TSSBOT/.env via python-dotenv, reads DISCORD_KEY, logs on_ready,
  handles SIGTERM/SIGINT cleanly. Aborts with a clear error if the token
  is missing instead of silently exit-looping.

- TSSBOT/ecosystem.config.js: switch the default interpreter from system
  python3 to SREBOT's venv (../SREBOT/.venv/bin/python). Both bots share
  BOTS/SHARED and the same baseline deps (discord.py, dotenv, …); split
  into a dedicated TSSBOT/.venv only when the dependency sets diverge.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
NotSoToothless
2026-05-13 23:55:44 -07:00
committed by GitHub
parent a7de9ecad2
commit 34e9af2f94
2 changed files with 39 additions and 10 deletions
+5 -4
View File
@@ -4,10 +4,11 @@ require('dotenv').config();
// you need to point at a different checkout (e.g. local dev).
const DEPLOY_PATH = process.env.TSSBOT_DEPLOY_PATH || __dirname;
// Default to system python until TSSBOT grows its own dependency set.
// When BOT/botscript.py lands, create TSSBOT/.venv and switch this to
// `${DEPLOY_PATH}/.venv/bin/python`.
const PY_INTERPRETER = process.env.TSSBOT_PY_INTERPRETER || 'python3';
// Reuse SREBOT's venv by default — both bots share BOTS/SHARED and most
// runtime deps (discord.py, dotenv, etc.). Split into TSSBOT/.venv once
// the dep sets diverge meaningfully.
const PY_INTERPRETER =
process.env.TSSBOT_PY_INTERPRETER || `${DEPLOY_PATH}/../SREBOT/.venv/bin/python`;
module.exports = {
apps: [