/Discord-Chatbot-Gpt4Free

This is a Python-based Discord bot using the discord.py library. The bot responds to messages this is all free due to the GPT4FREE project

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

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 library from GPT4FREE for generating responses based on conversation history.

Preview 👀

image

Features 🥳

  • Responds to messages in direct messages only
  • Changes its profile picture with the !pfp command.
  • Provides latency information with the !ping command.
  • Changes its username with the !changeusr command.

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

image

Enable intents

image

Get the token !!! by clicking copy

image

Step 4. 🔐 Create a .env file. It will look like this:

DISCORD_TOKEN=token_from_step_3

image

Step 5. ⚙️ Install all the dependencies

Windows:

py pip install -r requirements.txt

Linux :

pip3 install -r requirements.txt

Step 6. 🚀 Run the bot

Windows

py main.py

Linux

python main.py

🏁 Final step. Invite your bot and DM (Direct message) it | ⚠️ IMPORTANT

image

✨✨✨ Other ways to run ✨✨✨

Using docker to run 🐳

  • 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

Try on repl.it

Want something nsfw ? then check this out: SEX-GPT