TelegramAktienBot/telegram_bot
2022-05-10 17:14:53 +02:00
..
api_handling updated version numbers 2022-05-10 09:57:23 +02:00
deploy Update Dockerfile 2022-04-26 09:46:13 +02:00
news updated version and date 2022-04-26 12:46:20 +02:00
shares \shares working now and also sensing with daily update. Daily update message prettier 2022-05-10 16:43:17 +02:00
.env.example Added timezone environment variable 2022-04-29 22:36:06 +02:00
bot_updates.py small fix 2022-05-10 17:14:53 +02:00
bot.py Markdown problems and share update done 2022-05-10 17:13:10 +02:00
Dockerfile Update Dockerfile #2 2022-04-26 09:48:34 +02:00
README.md Update README.md 2022-05-02 17:34:44 +02:00
requirements.txt Price converting, working with all isins now and new requirement 2022-05-08 10:37:52 +02:00

Telegram bot

Aktienbot telegram bot

Development

  1. Create virtual environment python -m venv venv
  2. Launch venv: .\venv\Scripts\activate
  3. Install requirements pip install -r telegram_bot/requirements.txt
  4. Set environment variables (see list below)
    1. Use .env-file in api directory like .env.example
    2. Or set variables using export or set commands. (Windows set, Linux export)
  5. Run api python telegram_bot/bot.py

Environment variables

    # Telegram bot api key
    BOT_API_KEY=
    
    # News api key
    NEWS_API_KEY=

Docker

docker run -d \
    --name aktienbot_bot \
    --hostname aktienbot_bot \
    --publish 80:80 \
    --env "BOT_API_KEY=" \
    --env "NEWS_API_KEY=" \
    --restart unless-stopped \
    registry.flokaiser.com/aktienbot/bot:latest

or load environment variables from file by using --env-file <filename>