TelegramAktienBot/telegram_bot
2023-03-28 11:23:55 +02:00
..
api_handling Migrate from github to gitea + some improvements 2022-09-18 00:39:03 +02:00
deploy Update Dockerfile 2022-04-26 09:46:13 +02:00
news Reformatting 2022-05-11 23:33:48 +02:00
shares Reformatting 2022-05-12 09:09:05 +02:00
.env.example Migrate from github to gitea + some improvements 2022-09-18 00:39:03 +02:00
bot_updates.py Build bot 2022-09-18 15:42:40 +02:00
bot.py Fixed frontend build 2022-09-18 15:24:22 +02:00
Dockerfile Use Gitea actions instead of woodpecker and updated dependencies 2023-03-28 11:23:55 +02:00
helper_functions.py added more markdown symbols 2022-05-12 09:28:37 +02:00
README.md Use Gitea actions instead of woodpecker and updated dependencies 2023-03-28 11:23:55 +02:00
requirements.txt Update dependency pyTelegramBotAPI to ~=4.8.0 2022-12-12 10:47:07 +01: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 file 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 \
    git.flokaiser.com/dhbw/aktienbot-bot:latest

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