Skip to content

Releases: Herrscherd/dctl

v1.1.0 — slash-command builders + registry

Choose a tag to compare

@Akayashuu Akayashuu released this 16 Jun 07:25
c772f13

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 de Opt / 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 vide
  • Dispatch (commandes) + Autocomplete / DispatchAutocomplete
  • Registry stable, app id / sole guild résolus une fois et cachés

Breaking

  • Le type fonctionnel Option du Client est 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

Choose a tag to compare

@Akayashuu Akayashuu released this 16 Jun 05:10

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.
  • Channel now exposes ParentID (mapped from parent_id).
  • Test coverage for both reuse and create paths.

v1.0.0

Choose a tag to compare

@Akayashuu Akayashuu released this 16 Jun 05:07

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.0

Highlights

  • Three-layer architecture — a single mockable transport HTTP seam → per-resource sub-clients → a thin Client faç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.Token are self-redacting Secrets ([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 return transport.ErrDisabled so 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.