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 Samples

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

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
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

5 days ago