dgo is a Go library for Discord's REST, Gateway, and Voice APIs. It is an independent hard fork of bwmarrin/discordgo with its own compatibility and release policy.
- Discord API v10 REST and Gateway bindings
- Gateway event handling, state tracking, and voice connections
- DAVE end-to-end voice encryption support
- Context-aware REST rate limiting and bounded retries
- Structured logging with credential redaction
- Safe defaults: no Gateway intents and no parsed mentions unless enabled
- Go 1.26.6 or newer
go get github.com/darui3018823/dgo@v1.0.0Import the package as dgo:
import "github.com/darui3018823/dgo"Create a bot session from a raw bot token. NewBot adds the required Bot
authorization prefix:
session, err := dgo.NewBot(token)
if err != nil {
return err
}
session.Identify.Intents = dgo.IntentsGuildsGateway connections accept bot credentials only. OAuth2 bearer credentials may be used with applicable REST endpoints. Automated user accounts and private client routes are not supported.
- Getting started
- Migration, compatibility, and deprecation policy
- v1.0.0 release notes
- Public API inventory
- Package reference
- Examples
The exported VERSION value and Version() function are resolved from Go
build information. Tagged module builds report their tag, pseudo-version
builds report the pseudo-version, and local builds report a devel version
with VCS information when available.
For dgo bugs and feature requests, use GitHub Issues. For general Go discussion, visit the Discord Gophers community.
Before opening a pull request:
- Open or reference an issue describing the change.
- Follow the repository's current naming and compatibility conventions.
- Run the root and nested-module verification described by CI.
- Target the
masterbranch.
dgo retains the BSD-3-Clause lineage and attribution of the upstream project. Thanks to the upstream maintainers and contributors, including Chris Rhodes, who created the original upstream project logo used by the inherited documentation assets.