Releases: Herrscherd/dctl
Releases · Herrscherd/dctl
Release list
v1.1.0 — slash-command builders + registry
Nouveautés
Builders de slash commands typés (commands.go, locales.go)
NewCommand/NewUserCommand/NewMessageCommand- Couverture complète : tous les types d'options,
Choices,Range,Len,ChannelTypes,Autocomplete,NSFW,Perms(default_member_permissions),DMPermission - Localisation complète via le type
Locale(32 locales) —.Loc(...)sur command / option / choice
Ops REST granulaires (interactions.go)
List·Create·Edit·Delete·Register(...*Command)(bulk)RegisterCommands([]map[string]any)conservé (back-compat)- Accesseurs d'options :
OptInt/OptFloat(en plus deOpt/OptBool)
Registry nom→handler (registry.go)
Add/Update/Remove(thread-safe)Sync= diff réel contre Discord (create / edit / delete) ; refuse de wiper sur registry videDispatch(commandes) +Autocomplete/DispatchAutocomplete- Registry stable, app id / sole guild résolus une fois et cachés
Breaking
- Le type fonctionnel
OptionduClientest renomméClientOption(aucun consommateur externe ne le référence).
Install : go get github.com/Herrscherd/dctl@v1.1.0
83 tests, go test -race et go vet verts.
v1.0.1
Channels.EnsureUnder
Channels.EnsureUnder(ctx, parentID, name)— ensure-or-create a text channel nested under a category. Matching is case-insensitive and scoped to the parent, so the same name can coexist under different categories.Channelnow exposesParentID(mapped fromparent_id).- Test coverage for both reuse and create paths.
v1.0.0
First stable release of dctl — a pure, dependency-free Go client for the Discord REST API (v10). No gateway, no websocket, no CLI: every call is an on-demand HTTPS request behind a small, ergonomic API.
go get github.com/Herrscherd/dctl@v1.0.0Highlights
- Three-layer architecture — a single mockable
transportHTTP seam → per-resource sub-clients → a thinClientfaçade (c.Messages(),c.Channels(), …). - Zero third-party dependencies — enforced by a test that fails on any non-stdlib import.
- Security by construction — every dynamic URL segment is percent-escaped and queries are built with
url.Values(no path/query smuggling);Webhook.Token/Interaction.Tokenare self-redactingSecrets ([REDACTED]in logs and JSON,.Reveal()when needed). - Sensible defaults —
""targets the configured default channel or the bot's sole guild; clients built without a token returntransport.ErrDisabledso callers stay oblivious to whether the feature is on. - Typed errors — non-2xx responses surface as
*transport.APIError{Status, Body}for programmatic branching.
Resources
Messages · Channels · Roles · Members · Reactions · Threads · Permissions · Webhooks · Interactions · Components · Guilds.
MIT licensed.