Open-source AI assistant that answers questions from your docs, GitHub issues and READMEs via an API, Discord, Slack or web widget.
Kav-K/GPTDiscord
A self-hosted Discord bot that brings OpenAI chat, image generation, transcription, moderation and web search into Discord servers.
- Stars
- 1,850
- Forks
- 290
- Open issues
- 44
- Last commit
- 6 days ago
What is it?
GPTDiscord is a Python Discord bot that exposes OpenAI capabilities as slash commands. Server members can hold ChatGPT-style conversations, including vision and reasoning models, generate images with the GPT Image API, transcribe audio, run moderation checks, and search the web with source links.
The bot can also index documents, GitHub repositories and YouTube transcripts for question answering, and optionally store long-term memory in Qdrant or Pinecone. Code execution via E2B, Replicate fallback vision and DeepL translation are available as optional integrations with separate dependencies.
Access is controlled by Discord server IDs and role IDs, and the bot can run from source, as a pip-installed console command, or in Docker with a non-root container image.
Key features
- 01Chat Completions conversations with vision and reasoning model support
- 02Image generation with the GPT Image API and per-image variation controls
- 03Audio transcription and OpenAI-based moderation
- 04Web search with visible source links through the Responses API
- 05Document, GitHub and YouTube indexing for question answering
- 06Role-based access restriction using Discord role IDs
Use cases
- Giving a Discord community a shared AI assistant with per-server access control
- Querying internal documents or a GitHub repository from a Discord thread
- Automatically moderating messages with OpenAI moderation models
- Running a self-hosted OpenAI-powered bot in Docker
Quick start
- 1
Clone the repository, then change into the GPTDiscord folder
git clone https://github.com/Kav-K/GPTDiscord.git - 2
Install the bot with pip (Python 3.11–3.13 required)
python -m pip install . - 3
Copy the sample env file, then add your OpenAI key, Discord token and server ID to .env
cp sample.env .env - 4
Start the bot
python gpt3discord.py
Things to know
- Needs an OpenAI API key with billing; a ChatGPT subscription does not include API access.
- Requires creating a Discord application and enabling the Message Content and Server Members intents.
- Web search via /web incurs extra OpenAI charges beyond normal model usage.
In collections
Topics
FAQ
- What is GPTDiscord?
- A self-hosted Discord bot that brings OpenAI chat, image generation, transcription, moderation and web search into Discord servers. GPTDiscord is a Python Discord bot that exposes OpenAI capabilities as slash commands. Server members can hold ChatGPT-style conversations, including vision and reasoning models, generate images with the GPT Image API, transcribe audio, run moderation checks, and search the web with source links.
- Is GPTDiscord free to use? What license does it have?
- GPTDiscord is open source under the MIT license. Check the license terms before using it in commercial products.
- Is GPTDiscord still maintained?
- Actively maintained. The last commit to GPTDiscord was on Nov 1, 2026.
- What can I use GPTDiscord for?
- Giving a Discord community a shared AI assistant with per-server access control Querying internal documents or a GitHub repository from a Discord thread Automatically moderating messages with OpenAI moderation models Running a self-hosted OpenAI-powered bot in Docker
- How do I install GPTDiscord?
- Clone the repository, then change into the GPTDiscord folder: git clone https://github.com/Kav-K/GPTDiscord.git Install the bot with pip (Python 3.11–3.13 required): python -m pip install . Copy the sample env file, then add your OpenAI key, Discord token and server ID to .env: cp sample.env .env Start the bot: python gpt3discord.py
- Where can I get GPTDiscord?
- The source code and installation instructions are on GitHub: https://github.com/Kav-K/GPTDiscord
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A WordPress plugin that adds AI features like summaries, tagging, alt text, translation-free content generation and TTS using OpenAI, Azure, Gemini or Ollama.
A Discord bot that turns a server or DM into a shared frontend for any OpenAI-compatible LLM, local or remote.
A lightweight Python framework for building modular, schema-driven AI agent pipelines on top of Instructor and Pydantic.
An Android voice assistant app that lets you chat with OpenAI and other LLMs using speech input, image recognition and image generation.
A multi-channel, multi-language chatbot on AWS that answers customer questions over chat, voice, SMS and Amazon Alexa, managed through a Content Designer UI.