To build the bot using this source-code, setup all vars manually and fill it at eduu/config.py file.
- Fork this repo
- Visit heroku.com
- Create new App -> Enter the App Name -> Choose App Country
- Click on Deploy Tab
- Click on GitHub Tab -> Connect the App to Your GitHub account
- Enter the Repo name You've forked before -> Tap Connect
- Click on Deploy Branch button
- After build done -> Click on Resources Tab -> Switch Toggle On
Clone the repo first
git clone https://github.com/levina-lab/guard-bot
# install python3-venv
sudo apt install python3-venv
# activate venv
python3 -m venv venv
. ./venv/bin/activate
# install requirements
pip install -Ur requirements.txt
# setup config
cd eduu
nano config.py (type CTRL + s to save change & CTRL + x to exit)
cd .. (exit from eduu directory)
# run the bot
python3 -m eduu
Or if you using systemd take a look at this
make a file named eduubot.service
and fill it with one of there
[Unit]
Description=EduuBot
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/eduubot
# if you using venv
ExecStart=/path/to/venv/bin/python3 -m eduu
# if you not using venv
# ExecStart=/usr/bin/python3 -m eduu
Restart=always
[Install]
WantedBy=multi-user.target
Then run this command
sudo cp eduubot.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable eduubot
sudo systemctl start eduubot
This source-code is fully based on AmanoTeam's repo and fully re-edited by me for personal use, and for another else want to use this source-code so thanks to them.
Thanks to VysakhTG for his Contribution on making clone feature.