gdk is an software command framework constructed on prime of gda. It supplies slash command routing, differential command synchronization, token-bucket charge limiting, UI element dealing with and twin execution transports (persistent Gateway WebSocket or serverless HTTP Webhooks) utilizing solely the Go normal library.
Structure & Design
gdk is organized into centered subsystems
- App: Software lifecycle runner, practical configuration, swish shutdown, twin execution transports and modular registration (
Module). - Command: Slash command declarations, typed choice definitions throughout all 9 Discord choice sorts, subcommand timber, autocomplete routing and native schema validation.
- Context: Execution context handed to handlers, typed choice extraction with default fallbacks, automated 2.5-second deferral and fluent motion suites.
- Element: Declarative builders for wealthy embeds with strict restrict checking, buttons, choose menus, motion rows with auto-packing (
PackRows) and modals. - Middleware: Interception pipelines, 64-shard partitioned token-bucket cooldown retailer, permission checks and panic restoration (
Guard). - Utilities: Compound human length parsing (
1h 30m,2nd) and dynamic Discord markdown timestamp formatting (<t:UNIX:STYLE>).
Set up
Requires Go 1.24 or greater:
go get github.com/sfossl/gdk

