Skip to content

Add support for environment variables for Docker and automation compatibility #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sherlock7402
Copy link

@sherlock7402 sherlock7402 commented Mar 24, 2025

This PR improves automation compatibility by introducing support for environment variables, making the bot easier to use in Docker containers or other non-interactive environments (e.g. cronjobs). Suggestion in Discord: https://discord.com/channels/1302750463904579665/1353538974970544208

Changes:

  • AUTO_UPDATE environment variable added:
    • AUTO_UPDATE=true → automatically applies updates without user input.
    • AUTO_UPDATE=false → skips updates silently.
    • Not set → falls back to interactive prompt as before.
    • Clear console messages indicate how AUTO_UPDATE is interpreted.
  • BOT_TOKEN can now be provided via environment (BOT_TOKEN=...) instead of always requiring bot_token.txt or user input.
  • Behavior remains backward compatible for local/interactively run scripts.
  • Docker support example added in docker-compose.yaml:

Benefits:

  • Compatible with Docker, systemd, and crontab jobs.
  • Avoids blocking prompts in automated setups.
  • Easier installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant