Skip to content

Bot for calculating the Pythagorean Square of the “Psychomatrix” by date of birth.

Notifications You must be signed in to change notification settings

nessshon/psychomatrix-bot

Repository files navigation

🤖 Psychomatrix "Pythagoras Square" Bot

Requirements

  • Python 3.10 and above.
  • Systemd or Docker.
  • Redis

Usage

Clone this repo via link

git clone https://github.com/nessshon/psychomatrix-bot

Go to the project folder

cd psychomatrix-bot

Create environment variables file

cp .env.example .env

Edit environment variables in .env

nano .env

Launch using Docker

  1. Install docker and docker compose

  2. Build and run your container

    docker-compose up -d

Launch using systemd

  1. Create a virtual environment

    python3.10 -m venv env
  2. Activate virtual environment

    source env/bin/activate
  3. Install required packages

    pip install -r requirements.txt
  4. Check if the bot is running

    python -m app
  5. Set WorkingDirectory to the path to the project folder.

    nano telegram-bot.service
  6. Copy telegram-bot.service to /lib/systemd/system/

    sudo cp telegram-bot.service /lib/systemd/system/psychomatrix-bot.service
  7. Enable autostart on boot

    sudo systemctl enable psychomatrix-bot.service
  8. Launch Bot

    sudo systemctl start psychomatrix-bot.service

Environment variables reference

Variable Type Description
BOT_TOKEN str Token, get it from @BotFather
REDIS_HOST str Set "redis" if you will be using docker
TELEGRAPH_TOKEN str Get it using the create account method in the telegraph module.

About

Bot for calculating the Pythagorean Square of the “Psychomatrix” by date of birth.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published