Skip to content
AstrBot
Main Navigation HomeBlogRoadmapHTTP API

English

简体中文

English

简体中文

Toggle dark mode

Intro & DeployMessaging PlatformsAI IntegrationUsageDevelopment
Sidebar Navigation

Introduction

What is AstrBot

Community

FAQ

Deployment

Package Manager

One-click Launcher

Docker

Kubernetes

BT Panel

1Panel

Manual

Other Deployments

CasaOS

Compshare GPU

Community-provided Deployment

Support Us

Messaging Platforms

Quick Start

QQ Official Bot

Webhook Method

Websockets Method

WeCom Application

WeCom AI Bot

WeChat Official Account

Lark

DingTalk

Telegram

LINE

Slack

Misskey

Discord

OneBot v11

NapCat

Lagrange

Other Clients

Satori

Using LLOneBot

Using server-satori

Community-provided

Matrix

KOOK

VoceChat

AI Integration

✨ Model Providers

NewAPI

AIHubMix

PPIO Cloud

SiliconFlow

TokenPony

302.AI

Ollama

LMStudio

⚙️ Agent Runners

Built-in Agent Runner

Dify

Coze

Alibaba Bailian

Usage

WebUI

Plugins

Built-in Commands

Tool Use

Anthropic Skills

SubAgent Orchestration

Proactive Tasks

MCP

Web Search

Knowledge Base

Custom Rules

Agent Runner

Unified Webhook Mode

Auto Context Compression

Agent Sandbox

Development

Plugin Development

🌠 Getting Started

Minimal Example

Listen to Message Events

Send Messages

Plugin Configuration

AI

Storage

HTML to Image

Session Control

Publish Plugin

Platform Adapter Integration

AstrBot HTTP API

AstrBot Configuration File

Others

Self-hosted HTML to Image

Open Source Summer

OSPP 2025

On this page

Connecting to Discord ​

Create AstrBot Discord Platform Adapter ​

Navigate to the messaging platform, click to add a new adapter, find Discord and click to enter the Discord configuration page.

Click to create bot, select discord type

Options from top to bottom: 1. Bot name 2. Enable 3. Bot token 4. Discord proxy address 5. Auto-register plugin commands as Discord slash commands 6. discord_guild_id_for_debug 7. Discord activity name

For this tutorial, you only need to configure items 1, 2, 3, and 5

  • Bot Name: Customize this to easily distinguish between different adapters
  • Enable: Check to enable this adapter
  • Bot Token: Token obtained after creating an App in Discord (see below)
  • Discord Proxy Address: If you need to use a proxy to access Discord, you can enter the proxy address here (optional)
  • Auto-register Plugin Commands as Discord Slash Commands: When checked, AstrBot will automatically register commands from installed plugins as Discord slash commands for user convenience.

Create an App in Discord ​

  1. Go to Discord Developer Portal, click the blue button in the top right corner, enter an application name, and create the application.

Create bot (enter name)

  1. Click on Bot in the left sidebar, click the Reset Token button. After the token is created, click the Copy button and paste the token into the Discord Bot Token field in the configuration.

Token options

  1. Scroll down and enable all three of these options:

Presence Intent, Server Members Intent, Message Content Intent screenshot

  • Presence Intent: Allows the bot to access user online status
  • Server Members Intent: Allows the bot to access server member information
  • Message Content Intent: Allows the bot to read message content
  1. Click OAuth2 in the left sidebar, and in the OAuth2 URL Generator, select Bot Like this: OAuth2 URL Generator Then in the Bot Permissions section that appears below, select the allowed permissions. Generally, it's recommended to add the following permissions:
    • Send Messages
    • Create Public Threads
    • Create Private Threads
    • Send TTS Messages
    • Manage Messages
    • Manage Threads
    • Embed Links
    • Attach Files
    • Read Message History
    • Add Reactions If you find this tedious, you can directly use administrator permissions, but it's still recommended to use the permissions configured above (or the permissions you specifically need) in your production environment.

Remember, the higher the permissions, the greater the risk.

  1. Copy the Generated URL that appears below. Open this URL to add the bot to your desired server. Generated URL location

  2. Enter your Discord server, your bot should now show as online Bot online @ mention the bot you just created (or don't mention it), type /help. If it responds successfully, the test is successful.

Troubleshooting ​

  • If you're stuck at the final step and the bot is not online, please ensure your server can directly connect to Discord

If you have any questions, please submit an Issue.

Edit this page on GitHub

Last updated:

Pager
PreviousMisskey
NextNapCat

Deployed on Rainyun Logo