Documentation Index
Fetch the complete documentation index at: https://mintlify.com/disgoorg/disgo/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Get started with DisGo by installing the library in your Go project. DisGo is distributed as a standard Go module and integrates seamlessly with Go’s tooling.Requirements
Go version
Go 1.24.0 or higher required
Discord bot
Bot token from Discord Developer Portal
Install Go
If you don’t have Go installed, download it from the official Go website. Verify your installation:You should see output like
go version go1.24.0 linux/amd64 or higher.DisGo requires Go 1.24.0 or later due to its use of modern Go features including generics and the standard library’s
log/slog package.Create a new Go project
Initialize a new Go module for your bot:Replace
example.com/my-discord-bot with your own module path.Install DisGo
Add DisGo to your project using This will download DisGo and its dependencies, then update your
go get:go.mod file automatically.DisGo follows semantic versioning. The latest stable version is recommended for production bots.
Core dependencies
DisGo automatically installs its required dependencies:gorilla/websocket
WebSocket implementation for Gateway connections
disgoorg/snowflake
Discord snowflake ID handling
disgoorg/json
Optimized JSON marshaling/unmarshaling
golang.org/x/crypto
Cryptographic operations for voice encryption
Optional dependencies
Depending on your bot’s features, you may want to install additional DisGo ecosystem packages:DisGolink (for music bots)
If you’re building a music bot, install DisGolink to integrate with Lavalink:Paginator utilities
For interactive pagination in your bot:Create your Discord bot
Before you can run your bot, you need to create a bot application in the Discord Developer Portal:Visit the Developer Portal
Go to the Discord Developer Portal and sign in.
Configure privileged intents (if needed)
Some features require privileged intents:
- Presence Intent: For user status updates
- Server Members Intent: For member join/leave events
- Message Content Intent: For reading message content
Environment setup
Store your bot token securely using environment variables:.env
main.go
Next steps
Now that DisGo is installed, you’re ready to build your first bot:Quickstart
Build a ping-pong bot in minutes
Basic concepts
Understand DisGo’s architecture