Skip to content

A simple discord bot powered by OpenAI's GPT-3 language model. The bot can respond to prompts and generate natural language responses.

Notifications You must be signed in to change notification settings

mmdmirh/ChatGPT-DiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for mybot.py

Introduction

This is a Discord bot created using the Python programming language and the Discord API. The bot uses the OpenAI API to respond to commands in the Discord chat.

Requirements

  • Python 3.x
  • discord.py
  • openai

Installation

  1. Clone the repository
git clone https://https://github.com/mmdmirh/ChatGPT-DiscordBot.git
  1. Navigate to the repository
cd <repository>

  1. Create a virtual environment (optional)
python -m venv venv
  1. Activate the virtual environment (optional)

On Windows:

venv\Scripts\activate

On Linux and macOS:

source venv/bin/activate
  1. Install the required packages
pip install -r requirements.txt
  1. Create a .env file in the repository root and add the following variables:
OPENAI_API_KEY=<your OpenAI API key>
DISCORD_BOT_TOKEN=<your Discord bot token>
  1. Run the bot
python mybot.py

Usage

The bot will respond to the following command in the Discord chat:

  • !gpt : The bot will generate a response using OpenAI's language generation model. The prompt should be written after the !gpt command.

Contributing

Please feel free to contribute to this project by submitting pull requests or reporting issues.

About

A simple discord bot powered by OpenAI's GPT-3 language model. The bot can respond to prompts and generate natural language responses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages