- Clone repo
git clone -b ptb https://github.com/ProjectBlaze/BlazeBot
- Move to BlazeBot directory and setup virtual environment.
cd BlazeBot
sudo apt install python3-pip
pip install virtualenv
virtualenv venv
- Start screen session
screen -S bot
- To activate virtual environment
source venv/bin/activate
- Install all required packages
pip install -r requirements.txt
- Start bot
python blazebot.py
Now once bot has been started, use CTRL+A+D to leave screen session without stopping bot.
Update bot on your local machine then push the changes. Considering you are outside screen session,
- Open screen session we created earlier
screen -Dr bot
-
Stop bot using CTRL+C
-
Pull the changes from github
git pull origin ptb
- Start bot again
python blazebot.py
- Detach from screen session using CTRL+A+D
This bot uses secrets.txt file saved in your user home directory, i.e. ~/secrets.txt
.
Save your credentials in this file in following format.
WARNING : NEVER SHARE THIS FILE WITH ANYONE UNLESS YOU TRUST THEM.
BOT_TOKEN
SOURCE_FORGE_PASSWORD
CHAT_ID
OPEN_AI_TOKEN
Bot Token can be brought from Bot Father on Telegram.
Source forge password is required only if you want to use Upload feature of bot, only supported from GDrive to SourceForge. Write "None" if not required.
CHAT_ID helps you to restrict bot usage in perticular group. To get CHAT_ID of your group,
- Add bot your group.
- Make it admin.
- Use command
/chatid
Then bot will reply with CHAT_ID.
OPEN_AI_TOKEN only if you want to chat with bot with weird replies. Leave "None" if not reuired.
You can contact me using following ways
- Email : [email protected]
- Telegram : ganesh314159
- Instagram : ganesh314159
- Discord : Hououin-kyouma#1395