Skip to content

Make an AI Discord bot

It chats with your members and makes images from a prompt.

Connect ChatGPT to your bot and members can ask it questions with /respond, have it rewrite text with /edit-text, or @mention it to chat. Turn on Image Generation and /imagine posts a picture of whatever they type. You set it all up in BotGhost, the no-code Discord bot maker, and BotGhost hosts the bot for you.

The AI modules need Premium and your own OpenAI API key. OpenAI bills you for what your bot uses.

The ChatGPT module's settings: the OpenAI API Key field, the Model picker set to GPT 4-o Mini, and Chatmode, which makes the bot reply to its @mentions

A ChatGPT Discord bot with chat mode and slash commands

The ChatGPT module sends your members' messages to OpenAI and posts the answers. Paste in your OpenAI key, pick a model (like GPT 4-o Mini), and press Enable.

  • Chatmode

    @mention the bot in the channel you pick and it chats back. You can give each channel a different personality, so #help is polite and #memes isn't.

  • /respond

    Members type a question into the /respond command and the bot answers in the channel.

  • /edit-text

    Paste some text and say how to change it, like making it shorter or fixing the typos.

You can limit each command to certain channels or roles. They're made of normal builder blocks, so you can open them and change anything.

The ChatGPT module in the docs

AI image generation in Discord with /imagine

The Image Generation module adds an /imagine command. Someone types "a ghost eating pizza", DALL-E draws it, and a few seconds later the picture's in the channel.

  • Default size is up to you: 1024, 512, or 256 pixels square.

  • Switch on multiple variations and members flip through them with buttons.

  • It runs on the same kind of OpenAI key as ChatGPT, so you can use one key for both.

The Image Generation module in the docs
#art
You used /imagine
BotGhost Community APPToday at 18:02
a red ghost flying over a city at night, pixel art

Example picture. Your bot posts the image DALL-E makes.

Use your own OpenAI API key

BotGhost doesn't sell AI credits. Each AI module has an OpenAI API Key field, and your bot uses that key for every reply and every picture.

The Image Generation module's settings: the OpenAI API key field, a Generate multiple variations switch, and Default image size set to 1024x1024 pixels
  1. 1Sign in to the OpenAI platform, open API keys, and create a new secret key.
  2. 2Paste the key into the module's OpenAI API Key field. Collaborators on your bot can't see it.
  3. 3Add billing to your OpenAI account. OpenAI charges you for what your bot uses, separately from BotGhost.
  4. If your bot answers with a 429 error, the key has run out of credit. Add billing on OpenAI and try again.
  5. Get an OpenAI key, step by step

Build your own AI commands with Claude, Gemini, or ChatGPT

For a different AI model or your own prompt, use the Send an API Request block. Every bot has it, and its AI templates fill in the request for you. Search the block list for "chatgpt" or "claude" to find them.

  • Ask ChatGPT
  • Ask Claude
  • Ask Gemini
  • Ask any AI model (OpenRouter)
  • Generate an image (DALL·E 3)
  • Does this break the rules? (AI judge)
  • Save your key once in Secrets and the template reads it as {SECRET_OPENAI_API_KEY}. We encrypt it, and nobody sees it again after you save it (you included).

  • The answer comes back as a variable marked AI reply, ready for a message, an embed, or a Comparison Condition.

  • The block works on the free plan too, inside your 3 custom commands.

Every block is in the Discord bot command builder. Send an API Request has its own docs page.

AI on the free plan and on Premium

The two AI modules need Premium, and the Send an API Request block works on the free plan. OpenAI bills you for your usage on both.

FeatureFreePremium
ChatGPT module: Chatmode, /respond, and /edit-textNot includedIncluded
Image Generation module: /imagineNot includedIncluded
Send an API Request block with AI templatesIncludedIncluded
Secrets for your API keys550
Custom commands3Unlimited
Servers5Unlimited

Premium is $12.50 a month for one bot, or $75 a year. Premium on every bot you own is $25 a month. A free bot switches off after 2 days without activity; Premium bots stay on.

AI Discord bot questions

If your question isn't here, ask in the BotGhost Discord or read the docs for the ChatGPT module.

It's a bot that sends what members say to an AI model and posts the answer back, so it can reply to questions nobody wrote an answer for. On BotGhost you get one from the ChatGPT and Image Generation modules, or by building your own commands with the Send an API Request block.

See the ChatGPT module

Add AI to your Discord bot

Making the bot is free. The ChatGPT and Image Generation modules need Premium.

Create your bot for free