# A zero-dependency Discord API v10 driver for Go

**URL:** <https://forum.golangbridge.org/t/a-zero-dependency-discord-api-v10-driver-for-go/42751>\
**Category:** Releases\
**Created:** [October 31, 2026, 12:34pm UTC](https://forum.golangbridge.org/t/a-zero-dependency-discord-api-v10-driver-for-go/42751 "2026-10-31T12:34:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prachigoenka](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/prachigoenka/32/18008_2.png) [@prachigoenka](https://forum.golangbridge.org/u/prachigoenka)\
**Post date:** [October 31, 2026, 12:34pm UTC](https://forum.golangbridge.org/t/a-zero-dependency-discord-api-v10-driver-for-go/42751/1 "2026-10-31T12:34:29Z")

</div>

`gda` is a low-level Go driver for the Discord API v10 and Gateway WebSocket protocol, implemented using only the Go standard library (`net/http`, `crypto/ed25519`, `compress/zlib`).

- **Documentation** : [pkg.go.dev/github.com/sfossl/gda](https://pkg.go.dev/github.com/sfossl/gda)
- **Module** : `github.com/sfossl/gda` (v0.1.0)
- **License** : MIT

### Architecture & Design

- **Zero External Dependencies** : Pure Go 1.24 stdlib. Zero third-party packages in `go.mod`.
- **Rate Limiting** : Pre-flight, route-bucketed coordination tracking Discord’s per-route header buckets and global limits in memory before request execution.
- **Interactions** : Unified router for application commands and components over both persistent Gateway WebSockets and stateless HTTPS webhooks with Ed25519 verification.
- **Gateway** : WebSocket state machine with heartbeat watchdog, session resume and optional zlib stream decompression.
- **State Management** : Zero default in-memory caching for guilds, channels or members. Cache architecture is delegated entirely to the application layer.

### Installation & Usage

```bash
go get github.com/sfossl/gda@v0.1.0

```

```go
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/sfossl/gda"
	"github.com/sfossl/gda/types"
)

func main() {
	client, err := gda.New(
		os.Getenv("DISCORD_TOKEN"),
		gda.WithIntents(types.IntentGuildMessages|types.IntentMessageContent),
	)
	if err != nil {
		log.Fatal(err)
	}

	client.OnReady(func(ctx context.Context, r *types.ReadyEvent) {
		fmt.Printf("Connected as %s\n", r.User.Username)
	})

	client.OnMessageCreate(func(ctx context.Context, msg *types.Message) {
		if msg.Author.Bot {
			return
		}
		if msg.Content == "ping" {
			fmt.Printf("Ping received from %s\n", msg.Author.Username)
		}
	})

	if err := client.Start(context.Background()); err != nil {
		log.Fatal(err)
	}
}

```

Feedback, bug reports and benchmarks can be submitted at [GitHub Issues](https://github.com/sfossl/gda/issues).
