Katrix/AckCord
49.4
Weak · 20 September 2026
23.8k
lines of production code
Scala
with TypeScript
1
measurement over time
What this system is
AckCord is a Scala library for building Discord bots, providing type-safe data models and request bindings generated from the Discord API specification. It manages WebSocket gateway connections with automatic reconnection and heartbeat handling, while offering a high-level API for processing application commands and interactive components. The system includes built-in rate-limiting and asynchronous execution to handle REST API interactions reliably.
How it got here
2022 — Initial project setup and code generation
8 changes.
This period established the foundational structure of the AckCord project, including licensing, build tooling, and initial documentation. It introduced a comprehensive code generation infrastructure to parse Discord API definitions and produce type-safe Scala data models, request bindings, and gateway event handlers.
2023–2024 — Gateway rewrite and interactions support
7 changes.
The project underwent a significant architectural overhaul of the gateway layer, replacing the previous implementation with a Cats-effect-based system featuring resumable sessions and a component-based event processing model. Concurrently, a new interactions module was introduced to support Discord Application Commands and message components, enabling the development of modern bot features like slash commands and interactive UI elements. These core changes were accompanied by foundational improvements to data types for better type safety and standardized code quality tooling.
Features
Add support for Discord Application Commands and Message Components
This release introduces a new interactions module that enables building and handling Discord Application Commands (slash, user, and message commands) and message components (buttons, select menus, and text inputs). Users can now define command parameters, register global or guild-specific commands, and handle interaction responses including deferred updates and follow-up messages. The module also provides builders for creating interactive components and wiring them to handlers, along with the necessary data models and API request types to communicate with the Discord API.
interactions/src/main/scala · high confidence
Example app now supports slash commands, interactive components, and structured logging
The example application has been updated to demonstrate AckCord 2.0 features, including the registration and handling of slash commands (such as /info and /infoasync) and interactive UI components like buttons. It also introduces a new logback configuration for structured console logging and implements a gateway process handler to manage command interactions and event dispatching.
example · high confidence
Generated Discord API request bindings for new and updated endpoints
The \requests\ module now includes machine-generated Scala request definitions for several Discord API areas, including Applications (current app editing, role connection metadata), Auto Moderation (rule management), Audit Logs, Channels, Emojis, Entitlements, Guilds, and Guild Scheduled Events. These files provide the concrete HTTP request structures, body builders, and query parameters needed to interact with these specific API endpoints, reflecting recent changes to the Discord API.
requests/src/main/scala/ackcord/requests · high confidence
Generated gateway data models for Discord API events and operations
The gateway data layer now includes machine-generated Scala models for Discord Gateway protocol events, dispatch types, operation codes, and intents. This adds support for parsing and constructing gateway messages such as Ready, Heartbeat, Identify, and various guild/channel/message events, along with the corresponding GatewayIntents bitmask for subscribing to specific event streams.
gateway/src/main/scala/ackcord/gateway/data · high confidence
Initial generation of Discord API v10 data models
The \ackcord.data\ package now includes a comprehensive set of machine-generated Scala case classes and enums that map to the Discord API version 10. This initial data layer introduces type-safe representations for core entities such as \Application\, \AutoModerationRule\, \GuildScheduledEvent\, \Entitlement\, \SKU\, and \OAuth2Scope\, along with supporting structures like \AuditLog\ and \ApplicationRoleConnectionMetadata\. These generated files provide the foundational data structures required for interacting with the updated Discord API, replacing any previous manual or outdated definitions.
data/src/main/scala/ackcord/data · high confidence
Initial implementation of gateway, data models, and interaction handling
This release introduces the core infrastructure for the AckCord Discord library, including a new asynchronous gateway connector that manages WebSocket connections, reconnection logic, and event processing pipelines. It adds comprehensive data models for Discord entities, featuring custom JSON codecs for handling optional, null, and undefined fields (JsonOption, UndefOr) to accurately reflect Discord API behavior. Additionally, it provides a high-level API for handling application commands and interactions, supporting slash commands, message components, modals, and autocomplete with proper async response handling.
repository · high confidence
Initial project setup and documentation
This change establishes the foundational structure of the AckCord project by adding the MIT license, the Creative Commons Attribution-ShareAlike 4.0 license for ScalaDoc content, and the main README. It also updates the .gitignore to exclude build artifacts and tooling directories (such as node\_modules and makeDefns outputs) and refines the .scalafmt configuration to handle specific infix operator alignment.
(repo-wide) · high confidence
Introduce code generation infrastructure and update build tooling
The project now includes a new code generation system (AckCordCodeGen) that reads YAML type definitions and produces Scala source files, supporting classes, enums, opaque types, and API requests. This is supported by updated build tooling: sbt has been upgraded from 1.5.4 to 1.11.4, the sbt-scalajs plugin from 1.9.0 to 1.16.0, sbt-microsites from 1.3.4 to 1.4.3, and sbt-sonatype has been replaced with sbt-ci-release 1.5.12. Additionally, circe-core and circe-yaml (version 0.14.1) have been added as dependencies to support the YAML parsing required by the code generator.
project · high confidence
Introduce code generation tooling for Discord API definitions
Added new scripts in the \misc\ directory (\makeDataDefinitions.js\, \makeGatewayEventDefinitions.js\, \makeRequestDefinitions.js\) that parse Discord documentation pages to generate Scala type definitions. These tools extract data structures, gateway events, and API request signatures, mapping them to Scala types (e.g., \Int\, \String\, \Seq\) and outputting YAML files. A JSON schema (\typeDefnFiles.schema.json\) was also added to validate the structure of these generated definition files, supporting various definition types such as Classes, Enums, Opaque types, and Requests.
misc · high confidence
New base data types for opaque identifiers and enum handling
The library introduces foundational data structures to improve type safety and error reporting in data parsing. A new \DiscordOpaqueCompanion\ allows for the creation of opaque types that serialize and deserialize using their underlying representation, preventing accidental mixing of distinct ID types. Additionally, a \MissingFieldException\ is added to provide specific context when JSON fields are missing or fail to decode, and a \DiscordEnum\ trait with its companion object standardizes how enum-like values are encoded and decoded, defaulting to an 'unknown' state for unrecognized values.
data/src/main/scala/ackcord/data/base · high confidence
New base request handling and rate-limiting infrastructure
Added the core request execution and rate-limiting components for the library. This includes RequestHandling.scala, which manages sending REST requests via sttp, parsing Discord rate-limit headers, and implementing exponential backoff retries for failed requests. It also introduces a new rate-limiting system with a Ratelimiter trait and BaseDiscordRatelimiter implementation that uses token buckets and priority queues to manage global and route-specific limits, along with an OrElse utility type for lazy value resolution.
requests/src/main/scala/ackcord/requests/base · high confidence
Behavioural changes
Introduce new gateway event processing and connection architecture
The gateway module has been restructured with a new high-level API for handling Discord gateway connections and events. This change introduces a component-based processing model (\GatewayProcessComponent\) that allows for hierarchical event handling and context propagation across multiple handlers. It adds specific support for WebSocket communication via \GatewayHandler\ (with both normal and streaming variants) and factory patterns for creating these handlers. New data structures include \IdentifyData\ for bot identification parameters and a \Context\ system for passing state between components. Additionally, the codebase now includes utilities for asynchronous execution (\DoAsync\) and ZLIB decompression (\Inflate\), forming the foundation for the bot's core connectivity logic.
gateway/src/main/scala/ackcord/gateway · high confidence
New Cats-effect based gateway implementation
The gateway layer now provides a new implementation built on Cats Effect, introducing CatsGatewayHandlerFactory and CatsGatewayHandler to manage WebSocket connections. This change adds support for resumable sessions, automatic heartbeat handling with jitter, and specific error handling for Discord close codes (e.g., 4000-4014), replacing the previous handler structure with a functional, effect-based approach.
gateway/src/main/scala/ackcord/gateway/impl · high confidence
Standardized code quality and formatting tooling for makeDefns
The makeDefns module now includes dedicated configuration files for ESLint and Prettier, establishing a consistent development environment. ESLint is configured to enforce the Standard style with TypeScript support, applying strict rules for imports, const usage, and code structure, while Prettier is set to use single quotes, no semicolons, and a 120-character print width (with 80 characters for markdown, YAML, and JSON). Additionally, a .eslintignore file was added to exclude node\_modules from linting, and the Yarn 4.1.1 binary was introduced to manage the project's package manager.
makeDefns · high confidence
Dependencies
Add makeDefns tooling and upgrade Scala/circe dependencies
The \makeDefns\ directory introduces a new Node.js tooling package (\package.json\) with dependencies like \@readme/openapi-parser\, \markdown-it\, and \typescript\ to support documentation-based code generation. In the main Scala build (\build.sbt\), the project upgrades \circe\ from 0.13.0 to 0.14.2, updates the Scala version to 2.13.14 (adding 3.3.2 to cross-compilation), and replaces Akka HTTP dependencies in the \requests\ module with \sttp-client3\ and \log4cats-slf4j\.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 49.
Lenses
- Code Health 64
- Architecture 78
- Maturity 52
- Readiness 39
- Security 60
Changes since last survey
- 44 commits — 38 feature/other, 6 fixes
By area
- data/src — 13 commits
- gateway/src — 8 commits
- requests/src — 5 commits
- (root) — 4 commits
- interactions/src — 4 commits
- .github/workflows — 3 commits
- ackcord/src — 1 commit
- docs/src — 1 commit
- makeDefns/.yarn — 1 commit
- makeDefns/src — 1 commit
- misc/typeDefnFiles.schema.json — 1 commit
- project/CodeGenTypes.scala — 1 commit
- project/build.properties — 1 commit
Notable commits
- fix: Fix runs-on in Github action
- fix: Fix sbt build
- fix: Fix some bugs, and connect everything. Example works again
- fix: Fixes to get command interactions to work
- fix: More tweaks, features and fixes. Request sending works better now
- fix: fix: Avoid warning code
- change: 2.x is now on main
- change: A minimal runnable bot
- change: Add a small utility to make gateway dispatch event listeners
- change: Add changes to Discord API the last few months
- change: Add code to generate opaque types (#78)
- change: Add request generation and required files to run requests (#76)
- change: Add sbt setup
- change: Bump micromatch from 4.0.5 to 4.0.8 in /makeDefns (#80)
- change: Cats ratelimiter
- change: Clean up interaction handlers a bit
- change: Data compiles
- change: Don't publish with logback
- change: Gateway compiles
- change: Implement enum generation (#77)
- …and 24 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
Katrix/AckCord was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit ee7b132cd018a949a7e8e819efa7a58fa44314fc — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.