This is a Python-based Discord bot using the discord.py library. The bot responds to messages, can change its profile picture, and provide latency information. Additionally, it uses the theb library from GPT4FREE for generating responses based on conversation history.
-
Responds to messages in direct messages and active channel enabled by using
!toggleactivecommand. -
Changes its profile picture with the
!pfpcommand. -
Provides latency information with the
!pingcommand. -
Changes its username with the
!changeusrcommand. -
If anything gose wrong use !bonk to clear history
git clone https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free
cd Discord-Chatbot-Gpt4Free
Step 3. π Getting discord bot token and enabling intents from here
DISCORD_TOKEN=token_from_step_3
- If you dont have pip already. Run
python get-pip.pyon windows
pip install -r requirements.txt
pip3 install -r requirements.txt
py main.py
or
python main.py
python main.py
or
python3 main.py
- Invite your bot and DM (Direct message) it |
β οΈ Make sure you have DM enabled - if you want it in server channel use !toggleactive
- For more awesome commands use !welp
- Have a working bot token
- Follow up-to step 4
apt update -y ; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y
sudo docker-compose up --build
- Follow all the steps except
step 1 - Have a replit account
- Please note
.envis found in secrets tab of replit :
- Config
.envin replit like this :