Templates

Discord bot

Quick explainer2 min readBeginner

An AI Discord bot is a bot account in a Discord server that reads messages or slash commands and replies using a language model.

In plain words

You create an app in Discord's developer portal, add a bot to your server, and run code that listens for events. With the discord.py library, a function runs each time a message arrives. To read what people type, the bot needs the message content intent switched on. For an AI bot, that function sends the text to a model API and posts the reply. Discord apps can also use slash commands and buttons.

A quick example

discord.py's quick-start bot replies whenever a message starts with $hello. An AI version might listen for a /ask slash command, send the question to a model, and post the answer in the channel.

Where you'll meet it

  • Answering questions from members of a Discord server.
  • Bots that respond to slash commands and buttons.

Related

Sources

  1. DocsQuickstart, discord.py documentation · read 29 Sept 2026
  2. DocsBuilding your first Discord Bot, Discord Developer Docs · read 29 Sept 2026

Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.