Discord-AI-Chatbot
Discord-AI-Chatbot copied to clipboard
This Discord chatbot is incredibly versatile. Powered incredibly fast Groq API
Gpt4Free-Chat-bot 🤖
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
from GPT4FREE for generating responses based on conversation history.
Preview 👀
Commands ⚙️⚙️
- Toggle active channel for a server by using
!toggleactive
command. ⚠️
- Toggle if dm should be active or not by using
!toggledm
⚠️
-
Changes its profile picture with the
!pfp [url or attachment]
command. -
Provides latency information with the
!ping
command. -
Changes its username with the
!changeusr [New username]
command. -
If anything gose wrong use
!bonk
to clear history ⚠️
Steps to install and run 🚩 :
Step 1. 🎬 Git clone repository
git clone https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free
Step 2. 📁 Changing directory to cloned directory
cd Discord-Chatbot-Gpt4Free
Step 3. 🔑 Getting discord bot token and enabling intents from here
Select application
Enable intents
Get the token !!! by clicking copy
Step 4. 🔐 Rename example.env
to .env
and put the discord token. It will look like this:
DISCORD_TOKEN=token_from_step_3
Step 5. ⚙️ Install all the dependencies
Windows:
- If you dont have pip already. Run
python get-pip.py
on windows
pip install -r requirements.txt
Linux :
pip3 install -r requirements.txt
Step 6. 🚀 Run the bot
Windows :
py main.py
or
python main.py
Linux :
python main.py
or
python3 main.py
Step 7. Invite the bot
🏁 Finally talk to the bot
There are 2 ways to talk to the ai
- 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
✨✨✨ Other ways to run ✨✨✨
Using docker to run :whale:
- Have a working bot token
- Follow up-to step 4
Install docker compose on linux machine :
apt update -y ; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y
Start the bot in docker container :
sudo docker-compose up --build
Using replit to run ☁️
- Follow all the steps except
step 1
- Have a replit account
- Please note
.env
is found in secrets tab of replit :
- Config
.env
in replit like this :