- Python 3.10 and above.
- Systemd or Docker.
- Redis
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
-
Install docker and docker compose
-
Build and run your container
docker-compose up -d
-
Create a virtual environment
python3.10 -m venv env
-
Activate virtual environment
source env/bin/activate
-
Install required packages
pip install -r requirements.txt
-
Check if the bot is running
python -m app
-
Set WorkingDirectory to the path to the project folder.
nano telegram-bot.service
-
Copy telegram-bot.service to /lib/systemd/system/
sudo cp telegram-bot.service /lib/systemd/system/psychomatrix-bot.service
-
Enable autostart on boot
sudo systemctl enable psychomatrix-bot.service
-
Launch Bot
sudo systemctl start psychomatrix-bot.service
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. |