This project (dgo) is a hard fork of bwmarrin/discordgo.
It has been renamed and reorganized to serve as an independent library with modern features and critical voice encryption fixes.
This fork addresses Discord's voice encryption protocol changes (XChaCha20-Poly1305) and modernizes the codebase with updated linting, CI, and module structure.
- Renamed to
dgo: The package and module name are nowdgo. - Discord API v10: Updated to the latest Discord API version.
- Context Support:
OpenWithContextand cancellable rate limit waiting. - Structured Logging: Uses
log/slogfor modern, structured logging. - Improved Rate Limiter: Supports
X-RateLimit-Bucketheaders and context cancellation. - Modern Go: Requires Go 1.21+, uses
io.ReadAllinstead of deprecatedioutil. - Voice Encryption: Includes critical patches for
aead_xchacha20_poly1305_rtpsize.
dgo is a Go package that provides low level bindings to the Discord chat client API.
Contributions and feedback are welcome! Please open an issue or pull request on GitHub.
For general Go discussion, please join the Discord Gophers chat server. For dgo-specific issues, please use GitHub Issues.
go get github.com/darui3018823/dgoImport the package into your project.
import "github.com/darui3018823/dgo"Construct a new Discord client which can be used to access the variety of Discord API functions and to set callback functions for Discord events.
discord, err := dgo.New("Bot " + "authentication token")See Documentation and Examples below for more detailed information.
- First open an issue describing the bug or enhancement so it can be discussed.
- Try to match current naming conventions as closely as possible.
- Create a Pull Request with your changes against the master branch.
See this chart for a feature comparison and list of other Discord API libraries.
Chris Rhodes - For the DiscordGo logo and tons of PRs.