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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
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

2025-10-04