Skip to content
CAI
Software that uses CAICheck a score

serenity-rs/serenity

62.6

Weak · 30 September 2026

58.3k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Serenity is a Rust library for building Discord bots, providing comprehensive support for the Discord API including gateway events, HTTP interactions, and voice protocol data structures. The system features a modernized client architecture with explicit gateway intent handling, a type-safe builder pattern for API requests, and a flexible framework for defining and dispatching commands. It also includes utilities for caching, rate limiting, and integrating external resources like databases and web dashboards.

How it got here

2016–2017 — Async refactoring and framework modernization

20 changes.

This period focused on a comprehensive architectural shift from synchronous to async event handling, replacing legacy command and state management modules with a new extensible Framework trait and type-safe builder interfaces. The codebase was restructured to support Discord's modern features, including interactions, auto-moderation, and soundboards, while deprecating older components like the Standard Framework and voice extensions.

2019–2020 — Command framework and voice protocol expansion

20 changes.

This period focused on modernizing the command framework with an attribute-based macro system, fine-grained rate limiting, and optimized parsing. It also introduced the voice-model crate to support Discord Voice Gateway protocol handling. The work was accompanied by a comprehensive suite of examples demonstrating best practices for intents, sharding, and concurrent task management.

2021–2023 — Gateway bridge and example expansion

12 changes.

This period focused on establishing a new gateway bridge module to centralize shard management and event handling, while restructuring internal models for better type safety and organization. Concurrently, the project expanded its example suite to demonstrate advanced features such as slash commands, SQLite integration, web dashboards, and self-hosted interaction endpoints.

Features

Add SQLite database integration example

A new example (e16) demonstrates how to integrate a SQLite database with a Discord bot using the sqlx crate. The example shows how to manage a connection pool, run migrations, and perform CRUD operations (add, remove, list) on a todo list stored in the database, triggered by specific message commands.

_examples/e16\_sqlite\database · high confidence

Add command framework example with rate limiting and custom help

Introduces a new example demonstrating the standard command framework, featuring custom help commands, command grouping with prefixes, rate limit buckets with revert capabilities, and various event hooks for tracking and error handling.

_examples/e05\_command\framework · high confidence

Add example demonstrating environment-based logging with tracing

The \e07\_env\_logging\ example now shows how to integrate the \tracing\ crate for structured logging in a Serenity bot. It configures log levels via the \RUST\_LOG\ environment variable using \tracing\_subscriber\, applies instrumentation to the main function and command hooks to capture context, and demonstrates logging at INFO and DEBUG levels during bot startup and command execution.

_examples/e07\_env\logging · high confidence

Add example demonstrating message builder with embeds and attachments

The repository now includes a new example (e09\_create\_message\_builder) that shows how to construct a Discord message using the builder pattern. This example demonstrates creating a message with an embed (including title, description, fields, footer, and timestamp) and attaching a local file, while also illustrating the required setup of explicit gateway intents for the client.

_examples/e09\_create\_message\builder · high confidence

Add example demonstrating message components and interaction collectors

The new \examples/e17\_message\_components\ example shows how to use Discord message components, including string select menus and buttons with emojis. It demonstrates the full interaction lifecycle: sending a message with a select menu, waiting for a user's choice via a component interaction collector, updating the message with buttons, and handling subsequent button clicks with ephemeral replies.

_examples/e17\_message\components · high confidence

Add example demonstrating struct utility methods and explicit gateway intents

The e03\_struct\_utilities example now demonstrates how to use the 'utils' feature to call methods directly on model structs, such as sending a direct message via msg.author.dm(). It also shows the modern client initialization pattern using Client::builder with explicitly configured GatewayIntents.

_examples/e03\_struct\utilities · high confidence

Add sample bot command structure example

The \examples/e06\_sample\_bot\_structure/src/commands\ directory now contains a structured set of example commands for the Serenity bot framework, including a \math\ command for multiplication, a \meta\ command for ping/pong, an \owner\ command for graceful shutdown, and a \mod.rs\ file to expose these modules.

_examples/e06\_sample\_bot\structure/src/commands · high confidence

Add simple web dashboard example using Rillrate

Introduces a new example (\e15\_simple\_dashboard\) demonstrating how to integrate the \rillrate\ library to create a web-based dashboard for a Discord bot. The example showcases advanced features such as real-time statistics (latency, command usage), interactive configuration controls (switches, selectors, sliders), and data synchronization between the bot's internal state and the web interface.

_examples/e15\_simple\dashboard · high confidence

Add webhook execution example

Added a new example demonstrating how to execute a Discord webhook using the Serenity library. The example shows creating an HTTP client, initializing a Webhook from a URL, and sending a message with custom content and username via the ExecuteWebhook builder.

_examples/e18\webhook · high confidence

Example demonstrates transparent guild sharding with explicit gateway intents

The e02\_transparent\_guild\_sharding example now shows how to configure a Serenity client to handle multiple guild shards transparently. It requires explicitly setting gateway intents (GUILD\_MESSAGES, DIRECT\_MESSAGES, MESSAGE\_CONTENT) via the Client builder and uses start\_shards to run two shards, illustrating how a shared cache can access data across shards.

_examples/e02\_transparent\_guild\sharding · high confidence

Introduce ArgumentConvert trait for parsing Discord model types

This change introduces the \ArgumentConvert\ trait and its implementations for Discord model types such as \Channel\, \Member\, \Message\, \Role\, \User\, \Emoji\, and \Guild\. The trait provides a unified way to parse command arguments from strings into these types, supporting lookups by ID, mention, and name. Implementations leverage the cache when available but include fallbacks to HTTP requests for types like \Role\ and \User\ to ensure functionality even when the cache feature is disabled. Helper functions like \parse\_message\_url\ and \parse\_message\_id\_pair\ are also included to support message argument parsing.

_src/utils/argument\convert · high confidence

Introduce dedicated Colour model and restructure model module

The model module has been restructured to include a new \Colour\ type, providing a structured way to handle role and embed colours with RGB component accessors and presets, replacing previous integer-based handling. Additionally, new model files have been added to support user connections (\Connection\), monetization features (\Sku\, \Entitlement\), and a centralized error type (\ModelError\), while the event definitions have been consolidated into a new \event.rs\ module.

src/model · high confidence

Introduce voice gateway event models and deserialization

Added the \Event\ enum and its associated payload types (such as \Identify\, \Ready\, \Speaking\, and \Heartbeat\) to the \voice-model\ crate. This change provides the foundational data structures and custom JSON serialization/deserialization logic required to parse voice gateway protocol messages, enabling the application to correctly interpret incoming voice state updates and connection events.

voice-model/src/event · high confidence

Introduce voice-model crate for Discord Voice Gateway types

This change introduces the \voice-model\ crate, which provides the data structures and serialization logic for Discord's Voice Gateway protocol. It defines enums for voice opcodes (such as Identify, Ready, Heartbeat, and Speaking) and close codes, along with structs for payload messages like ClientConnect, Heartbeat, Hello, Identify, Ready, Resume, SelectProtocol, SessionDescription, and Speaking. The crate also includes type-safe ID wrappers for GuildId and UserId, a SpeakingState bitflag for speaker modes, and utility modules for JSON-safe u64 deserialization and protocol data handling.

voice-model/src · high confidence

Introduction of the attribute-based command framework

The \command\_attr\ crate now provides a new attribute-based macro system for defining commands, replacing the previous function-like macro approach. Users can now use \\#\[command\]\ to define command functions, with options specified via attributes such as \\#\[description\]\, \\#\[aliases\]\, \\#\[checks\]\, and \\#\[required\_permissions\]\. Documentation comments (\///\) are automatically interpreted as command descriptions, and the macro generates static command instances. The framework also supports sub-commands via \\#\[sub\_commands\]\, custom delimiters, and argument count validation.

_command\attr · high confidence

Introduction of the extensible Framework trait

The \src/framework\ module now exposes a new \Framework\ trait, allowing users to define custom command-dispatching logic that integrates with the client's event system. This trait provides \init\ and \dispatch\ methods, abstracting away manual message matching and enabling the creation of alternative command structures alongside the existing standard framework.

src/framework · high confidence

New Auto Moderation support in Guild models

The \src/model/guild\ module now includes dedicated types and methods for Discord's Auto Moderation feature. This adds the \automod\ submodule containing models for \Rule\, \Trigger\, \Action\, and \EventType\, allowing users to define keyword, regex, preset, and spam-based moderation rules. Additionally, \GuildId\ and \PartialGuild\ now expose methods (\automod\_rules\, \automod\_rule\, \create\_automod\_rule\, \edit\_automod\_rule\, \delete\_automod\_rule\) to fetch, create, edit, and delete these rules via the HTTP API.

src/model/guild · high confidence

New collector and interactions endpoint verification modules

Added a new \collector\ module providing generic and specific event collectors (for component interactions, modal interactions, reactions, and messages) that filter events and return them as streams with optional timeouts. Added an \interactions\_endpoint\ module containing a \Verifier\ struct to cryptographically verify incoming HTTP interaction requests using Ed25519 signatures, supporting the Interactions Endpoint URL feature.

src · high confidence

New example demonstrating Discord bot message and reaction collectors

The \examples/e10\_collectors\ directory now contains a complete example bot that showcases how to use collectors to await user interactions. The example demonstrates waiting for a specific reply with a timeout, collecting a single reaction to a message, gathering a stream of multiple messages from a user, and tracking message update events. It also illustrates configuring the standard framework with custom prefixes and delimiters, and explicitly setting gateway intents for messages and reactions.

_examples/e10\collectors · high confidence

New example demonstrating global data sharing and concurrency patterns

Added a new example (\examples/e12\_global\_data\) that illustrates how to share data across events and commands using the \TypeMap\. It demonstrates best practices for avoiding deadlocks by managing \RwLock\ and \Arc\ lifetimes, specifically showing how to track command usage counts and count specific keywords ("owo") in messages using atomic operations. The example also configures the \StandardFramework\ with custom prefixes and intents.

_examples/e12\_global\data · high confidence

New example demonstrating parallel background tasks with Discord bot

Added a new example (\e13\_parallel\_loops\) that shows how to run multiple concurrent background tasks within a Serenity bot. The example uses \tokio::spawn\ to create parallel loops for logging system load (CPU and memory) to a specific channel and updating the bot's presence with the current time, while using an \AtomicBool\ to prevent duplicate task spawning when the cache-ready event fires.

_examples/e13\_parallel\loops · high confidence

New example for self-hosted interaction endpoints

Added a new example demonstrating how to implement a self-hosted HTTP server to handle Discord interaction requests. The code shows how to use the \Verifier\ to cryptographically verify incoming requests via signature headers, parse the interaction payload, and respond appropriately to pings and commands using the updated \CreateInteractionResponse\ enum.

_examples/e19\_interactions\endpoint · high confidence

New gateway bridge module for shard management and event handling

The \src/gateway/bridge\ module has been introduced to centralize the client's gateway communication logic. This new structure provides the \ShardManager\ for controlling shard lifecycle (starting, restarting, and shutting down shards), the \ShardQueuer\ to handle rate-limited shard initialization, and the \ShardRunner\ to manage individual WebSocket connections and event dispatching. It also introduces the \ShardStageUpdateEvent\ to notify users when a shard's connection state changes, and adds support for requesting soundboard sounds via the \ShardMessenger\. This module serves as the foundational bridge between the Discord gateway and the higher-level client interface.

src/gateway/bridge · high confidence

New sample bot structure example added

A new example located at \examples/e06\_sample\_bot\_structure/src\ demonstrates a structured bot implementation using the standard framework. It shows how to configure intents explicitly, set up command groups, manage data containers for the shard manager, and handle graceful shutdown via Ctrl+C.

_examples/e06\_sample\_bot\structure/src · high confidence

New shard manager example demonstrating multi-shard status monitoring

Added a new example (e08\_shard\_manager) that demonstrates how to interact with the client's ShardManager to monitor shard status. The example configures a bot to run two shards, explicitly sets required gateway intents (GUILD\_MESSAGES, DIRECT\_MESSAGES, MESSAGE\_CONTENT), and spawns a background task that prints each shard's connection stage and WebSocket latency every 30 seconds.

_examples/e08\_shard\manager · high confidence

New utility modules for content sanitization, timestamps, and modals

The \src/utils\ module has been expanded with several new capabilities: \content\_safe\ now sanitizes Discord mentions (roles, users, channels, @here, @everyone) into raw text using the cache and optional user lists, with configurable options including a deprecated \show\_discriminator\ flag; \formatted\_timestamp\ introduces \FormattedTimestamp\ and \FormattedTimestampStyle\ to generate Discord's native timestamp formatting (e.g., \\<t:1234567890:f\>\); \custom\_message\ provides a builder for constructing dummy \Message\ instances for manual dispatch; \quick\_modal\ offers a convenience builder to create and handle modal interactions with timeouts; and \token\ adds a \validate\ function to check Discord token format, stripping the optional "Bot " prefix. The old \colour.rs\ utility has been removed.

src/utils · high confidence

Removals

Removal of legacy command framework implementation

The legacy command framework located in \src/ext/framework\ has been completely removed. This deletes the \command.rs\, \configuration.rs\, and \mod.rs\ files, eliminating the previous \Framework\ struct, its \dispatch\ logic, and the associated \Configuration\ builder. Users relying on this specific module for command registration, prefix handling, or message dispatching will no longer have access to these components.

src/ext/framework · high confidence

Removal of the legacy state management module

The \src/ext/state\ module, which previously maintained the application's known state (including guilds, channels, members, and user settings) and provided methods to query and update this state based on incoming events, has been completely removed from the codebase.

src/ext/state · high confidence

Removal of voice extension module

The voice extension module located at src/ext/voice has been completely removed from the codebase. This change eliminates the standalone voice connection capabilities and associated audio support previously provided by this module, aligning with the decision to remove support for group calls and guild sync.

src/ext/voice · high confidence

Behavioural changes

Audit log models restructured with typed change variants and new event support

The audit log module has been refactored to provide a more precise and type-safe representation of guild administrative actions. The \Change\ struct is now an enum where each variant corresponds to a specific audit log key (such as \avatar\_hash\, \bitrate\, or \system\_channel\_flags\) with strongly typed \old\ and \new\ values, replacing the previous generic mapping approach. This change improves reliability when inspecting what specifically changed in an audit entry. Additionally, the module now supports newer Discord API events, including Auto Moderation actions (\AutoMod\), creator monetization updates (\CreatorMonetization\), and voice channel status changes (\VoiceChannelStatus\). Helper utilities for serializing users and webhooks as maps have also been moved into a dedicated \utils\ module to simplify the main model definitions.

_src/model/guild/audit\log · high confidence

Cache subsystem restructured with configurable settings and event-driven updates

The cache implementation has been reorganized into distinct modules (\cache\_update\, \event\, \settings\, \wrappers\) to support fine-grained configuration and explicit event handling. Users can now configure caching behavior via \CacheSettings\, including toggles for guilds, channels, and users (\cache\_guilds\, \cache\_channels\, \cache\_users\), a message cache limit (\max\_messages\), and a time-to-live for temporary caches (\time\_to\_live\). The cache now uses a \CacheUpdate\ trait to define how specific gateway events (like \GuildCreateEvent\, \ChannelDeleteEvent\, etc.) modify the internal state, replacing implicit updates. Internally, it leverages \DashMap\ for concurrent access, \parking\_lot\ for locking, and \mini-moka\ for temporary caching, while exposing read-only references (\CacheRef\, \ReadOnlyMapRef\) to prevent deadlocks across await points.

src/cache · high confidence

Deprecation of the Standard Framework

The Standard Framework is now deprecated and scheduled for removal in version 0.13. Users are advised to migrate to the \poise\ library for command handling. This change affects the \src/framework/standard\ module, which now emits deprecation warnings and will no longer receive new features.

src/framework/standard · high confidence

Example now requires explicit Gateway Intents configuration

The gateway intents example has been updated to explicitly define and pass specific GatewayIntents (GUILDS, GUILD\_MESSAGES, MESSAGE\_CONTENT) when building the client. This change demonstrates the new requirement for users to explicitly configure intents rather than relying on defaults, ensuring the client only receives events relevant to the bot's functionality.

_examples/e11\_gateway\intents · high confidence

Gateway module restructure with new error handling and WebSocket client

The gateway module has been reorganized into distinct files (error, shard, ws, bridge) to improve code clarity and maintainability. A new \GatewayError\ enum has been introduced to provide specific, user-friendly error messages for common gateway issues such as invalid authentication, heartbeat failures, and reconnect issues. The \WsClient\ struct now encapsulates WebSocket connection logic, including support for transport compression and configurable timeouts. Additionally, the \Shard\ struct has been refined to better manage connection stages and presence data, enhancing the overall reliability of bot connections to Discord.

src/gateway · high confidence

HTTP module refactored into a modular structure with improved error and routing handling

The \src/http\ module has been restructured into distinct files (\client\, \error\, \multipart\, \ratelimiting\, \request\, \routing\, \typing\) to improve maintainability. This change introduces a new \HttpBuilder\ for constructing HTTP clients with configurable proxies, ratelimiters, and default allowed mentions. Error handling is enhanced with a new \ErrorResponse\ struct that includes status codes, URLs, and detailed Discord error paths, and the \HttpError\ enum now exposes methods to inspect error types. Routing is overhauled with a macro-based definition system that groups requests into ratelimiting buckets based on paths and major parameters (like channel or guild IDs). Additionally, the \Request\ struct now supports multipart uploads for attachments and files, and the \Typing\ struct provides a convenient way to start and stop typing indicators in channels.

src/http · high confidence

Internal refactoring: new macros, module structure, and Tokio task handling

The internal module has been restructured to provide a centralized set of helper macros and utilities. A new \bitflags!\ macro is introduced to automatically generate serialization and deserialization logic for bitmask types, ensuring consistent handling of Discord's flag values. The \enum\_number!\ macro simplifies the creation of enums that convert to and from numeric types while preserving unknown variants. Additionally, the internal Tokio integration now uses a \spawn\_named\ function that conditionally applies task naming via the \tokio\_task\_builder\ feature when available, improving debuggability of background tasks. These changes are internal implementation details and do not alter the public API surface.

src/internal · high confidence

Introduce dedicated builder types for Discord API interactions

The \src/builder\ module has been restructured to replace ad-hoc parameter passing with explicit, type-safe builder structs for various Discord API operations. This change introduces dedicated builders for creating and editing messages (\CreateMessage\, \EditMessage\), managing embeds (\CreateEmbed\), handling allowed mentions (\CreateAllowedMentions\), and constructing interactive components like buttons and select menus (\CreateButton\, \CreateSelectMenu\). It also adds builders for application commands (\CreateCommand\, \CreateCommandOption\), channel creation (\CreateChannel\), and OAuth2 authorization links (\CreateBotAuthParameters\). Users will now construct API requests by chaining methods on these new builder objects, which handle serialization and validation internally, providing a more consistent and ergonomic interface for interacting with the Discord API.

src/builder · high confidence

Introduce fine-grained rate limiting and structured check reasons

The standard framework now includes a new \buckets\ module that provides fine-grained control over command execution via rate-limiting buckets scoped to global, user, guild, channel, or category contexts. This introduces \RateLimitInfo\ to report delay status and allows configuring delay hooks and awaiting rate limits. Additionally, the \check\ module now defines a structured \Reason\ enum (with \User\, \Log\, and \UserAndLog\ variants) that implements \Display\ and \Error\, replacing previous ad-hoc failure reporting to give developers clearer insight into why a check failed.

src/framework/standard/structures · high confidence

Refactored command parsing with case-insensitivity support and optimized permission checks

The command parsing logic in the standard framework has been restructured to introduce dedicated \CommandMap\ and \GroupMap\ structures for more efficient command lookup and storage. This change enables case-insensitive command and prefix matching when the configuration option is enabled, ensuring commands are stored and retrieved in lowercase. Additionally, the permission checking mechanism has been improved to avoid stripping permissions during the parsing phase and includes a fallback to fetch member data via HTTP if it is missing from the cache, preventing incorrect permission defaults in large guilds.

src/framework/standard/parse · high confidence

Reorganized application models into a dedicated module

The application-related models (commands, interactions, components, OAuth scopes, and team info) have been consolidated into the \src/model/application\ module. This reorganization provides a clearer structure for slash commands, message components, modals, and OAuth2 scopes, making it easier to locate and use these features in your bot.

src/model/application · high confidence

Restructure examples into workspace crates with cargo-make support

The examples directory has been reorganized from flat Rust source files into individual workspace crates (e01 through e19), each with its own Makefile.toml extending the root build configuration. This change introduces cargo-make task aliases (examples\_build, examples\_run, etc.) for consistent building and running of examples, adds a comprehensive README listing all 19 examples with descriptions, and includes new examples for SQLite database integration (e16) and interactions endpoints (e19). The old flat-file examples (01-06) have been removed in favor of the new structured workspace approach.

examples · high confidence

Restructure slash command examples into individual files

The slash command examples in \examples/e14\_slash\_commands/src/commands\ have been reorganized so that each command (ping, id, attachmentinput, numberinput, modal, welcome, and wonderful\_command) is defined in its own source file, with a new \mod.rs\ aggregating them. This change improves code organization and maintainability for users studying or extending these examples, without altering the functional behavior of the commands themselves.

_examples/e14\_slash\commands/src/commands · high confidence

Reworked channel model module with new file structure and updated models

The \src/model/channel\ module has been restructured into separate files for \Attachment\, \ChannelId\, \Embed\, \GuildChannel\, \Message\, \PartialChannel\, and \PrivateChannel\. This change introduces updated model definitions, such as the \Attachment\ struct now including \content\_type\, \ephemeral\, and \waveform\ fields, and the \Message\ struct gaining support for \message\_snapshots\, \components\, and \interaction\_metadata\. The \GuildChannel\ model has been expanded to include thread-specific fields like \thread\_metadata\ and \default\_auto\_archive\_duration\, and the \Channel\ enum now explicitly handles \Guild\ and \Private\ variants with dedicated methods for conversion and deletion.

src/model/channel · high confidence

Rewrite of client event handling and connection architecture

The client module has been significantly refactored to modernize its event handling and connection management. The legacy synchronous \Connection\ struct and \EventStore\ callback map have been removed in favor of an async \EventHandler\ trait and a macro-generated \FullEvent\ enum, allowing for more flexible and type-safe event dispatching. The \Context\ struct has been redesigned to hold references to the \ShardMessenger\, \Http\, and optional \Cache\, replacing the previous direct dependency on the \Connection\ object. Additionally, the internal HTTP and ratelimiting logic has been moved out of the client module, and the framework integration has been decoupled into a separate feature-gated module.

src/client · high confidence

Serenity v0.12.5 release and repository maintenance

This entry covers the v0.12.5 release, which adds support for Discord's soundboard, PURCHASE\_NOTIFICATION message types, and various new fields and endpoints (such as guild ban fetching and entitlements), while deprecating \Member::distinct\ and guild creation. It also includes repository maintenance: the minimum supported Rust version (MSRV) is set to 1.74, the README and documentation have been updated to reflect the new \Client::builder\ API and \EventHandler\ trait, and build tooling has been standardized with new \.editorconfig\, \rustfmt.toml\, and \clippy.toml\ files.

(repo-wide) · high confidence

Slash commands example restructured into modular command files

The slash commands example has been refactored to organize individual commands (ping, id, attachmentinput, modal, etc.) into separate module files under a \commands\ directory, rather than being defined inline. The main entry point now imports these modules and delegates command registration and interaction handling to them, improving code organization and maintainability for users following this example.

_examples/e14\_slash\commands/src · high confidence

Updated examples to use explicit gateway intents and async client builder

The example bots in examples/e01\_basic\_ping\_bot and examples/e04\_message\_builder have been updated to explicitly configure gateway intents (GUILD\_MESSAGES, DIRECT\_MESSAGES, MESSAGE\_CONTENT) when initializing the client. The client is now created using the async Client::builder method instead of the deprecated Client::new, and the application entry point uses tokio::main for async execution. These changes align the examples with the current Serenity API requirements for intent handling and asynchronous initialization.

_examples/e01\_basic\_ping\bot · high confidence

Test coverage

Added benchmark for Voice Ready event JSON deserialization; Added benchmark suite for Args parsing; Added testing example with model size analysis; Added tests for ReactionType string and JSON conversion.

Dependencies

Serenity 0.12.5 release with Rust 2021 edition and MSRV 1.74

The Serenity library has been updated to version 0.12.5, migrating the codebase to the Rust 2021 edition and raising the Minimum Supported Rust Version (MSRV) to 1.74. This release introduces a new \command\_attr\ procedural macro crate (v0.5.4) for command creation and a \serenity-voice-model\ crate (v0.2.1) for voice API message serialization. Key dependency upgrades include \tokio\ to 1.34, \serde\_json\ to 1.0.108, \bitflags\ to 2.4, and \reqwest\ to \>=0.11.22. The feature system has been restructured to require an explicit TLS backend (defaulting to \rustls\_backend\), and new features such as \interactions\_endpoint\ (using \ed25519-dalek\) and \simd\_json\ (using \simd-json\ 0.13.4) have been added. Example projects have been reorganized into a workspace structure.

(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

Score

  • CAI 62 → 63 (+0.4)
  • Rubric changed (rubric-2026.09.10 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 90 → 90 (+0.0)
  • Architecture 94 → 84 (-10.0)
  • Maturity 57 → 57 (+0.0)
  • Readiness 46 → 49 (+3.6)
  • Security 92 → 95 (+2.7)
  • Event Sourcing 100 → 100 (+0.0)
  • Performance 91 (new)

Resolved (5)

  • Documentation: no usage examples (README.md)
  • Hotspot: src/framework/standard/help_commands.rs (src/framework/standard/help_commands.rs)
  • Hotspot: src/model/application/command_interaction.rs (src/model/application/command_interaction.rs)
  • Hotspot: src/model/event.rs (src/model/event.rs)
  • Off-boarding risk: anonymized user #1

New (27)

  • Ambiguity between add_files and files. add_files implies appending, while files often implies setting/replacing in other contexts, but here both take an iterator. It is unclear if files replaces existing files or adds to them. Similarly, add_file vs files (singular vs plural iterator) is inconsistent with the embed pattern.
  • Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
  • Documentation: no project overview (README.md)
  • Duplicate setter methods for the same property with different names (British vs American spelling). This forces users to choose between two identical methods or use both, creating confusion.
  • Inconsistent naming and signature for adding multiple embeds. add_embeds takes a single CreateEmbed instead of an iterator/collection, which is counter-intuitive for a plural method name. Additionally, embed and embeds appear to do the same thing (set/replace), while add_embed and add_embeds appear to do the same thing (append), but the plural variants have confusing single-item signatures.
  • Low cohesion: CreateChannel (LCOM4 17) (src/builder/create_channel.rs)
  • Low cohesion: CreateCommand (LCOM4 13) (src/builder/create_command.rs)
  • Low cohesion: CreateForumPost (LCOM4 5) (src/builder/create_forum_post.rs)
  • Low cohesion: CreateInteractionResponseFollowup (LCOM4 5) (src/builder/create_interaction_response_followup.rs)
  • Low cohesion: CreateInteractionResponseMessage (LCOM4 8) (src/builder/create_interaction_response.rs)
  • Low cohesion: CreateInvite (LCOM4 8) (src/builder/create_invite.rs)
  • Low cohesion: CreateMessage (LCOM4 8) (src/builder/create_message.rs)
  • Low cohesion: CreateScheduledEvent (LCOM4 9) (src/builder/create_scheduled_event.rs)
  • Low cohesion: CreateSoundboard (LCOM4 6) (src/builder/create_soundboard.rs)
  • Low cohesion: CreateThread (LCOM4 6) (src/builder/create_thread.rs)
  • Low cohesion: EditAutoModRule (LCOM4 8) (src/builder/edit_automod_rule.rs)
  • Low cohesion: EditChannel (LCOM4 19) (src/builder/edit_channel.rs)
  • Low cohesion: EditGuild (LCOM4 20) (src/builder/edit_guild.rs)
  • Low cohesion: EditRole (LCOM4 8) (src/builder/edit_role.rs)
  • Low cohesion: EditWebhook (LCOM4 4) (src/builder/edit_webhook.rs)
  • …and 7 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

serenity-rs/serenity 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 30 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 db6c7e188717c957c7051570dda60d314b6afe2d — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-505904ce13c1.