GPT Discord Bot is an example project from OpenAI that shows how to integrate the OpenAI API with Discord using Python. The bot uses the Chat Completions API (defaulting to gpt-3.5-turbo) to carry out conversational interactions and the Moderations API to filter user messages. It is built on top of the discord.py framework and the OpenAI Python library, providing a simple, extensible template for building AI-powered Discord applications. The bot supports a /chat command that spawns a public thread, carries full conversation context across messages, and gracefully closes the thread when context or message limits are reached. Developers can customize system instructions through a config file and modify the model used for responses. While minimal, this project offers a clear example of how to set up authentication, permissions, and message handling for deploying a functional GPT-powered chatbot in Discord.

Features

  • Chat Completions API integration for multi-turn conversations
  • Moderations API support for filtering unsafe content
  • /chat command to create public threads with persistent memory
  • Configurable bot instructions via config.yaml
  • Adjustable model, temperature, and max tokens parameters
  • Automatic thread closure when context or message limits are reached

Project Activity

See All Activity >

Categories

AI Models

License

MIT License

Follow GPT Discord Bot

GPT Discord Bot Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GPT Discord Bot!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Python

Related Categories

Python AI Models

Registered

2 days ago