Expand description
Discord Control - A Discord self-bot client library for Rust
This library provides functionality to interact with Discord as a user account, including WebSocket gateway connection, message operations, and event handling.
§Warning
This library implements Discord self-botting which violates Discord’s Terms of Service. Use at your own risk.
Re-exports§
pub use context::DiscordContext;pub use discord_user::ConnectionInfo;pub use discord_user::DiscordUser;pub use discord_user::DiscordUserBuilder;pub use error::DiscordError;pub use error::Result;pub use events::DispatchEvent;pub use message_builder::EmbedBuilder;pub use message_builder::MessageBuilder;pub use typed_events::TypedEvent;pub use types::*;
Modules§
- builder
- Type-state builder pattern for compile-time required-field enforcement.
- cache
- In-memory event-driven cache for Discord objects.
- cache_
http - Cache-fallback-to-HTTP pattern.
- client
- HTTP client for Discord API requests
- collector
- Stream-based event collectors.
- components
- Message component builders — buttons, select menus, and action rows.
- content_
safe - Content safety and mention sanitization.
- context
- discord_
user - Main DiscordUser client combining HTTP, WebSocket, and event handling
- error
- Error types for the
discord-user-rslibrary - events
- Event system for Discord dispatch events
- fmt
- Discord message formatting helpers.
- framework
- Text (prefix) command framework.
- gateway
- Discord WebSocket Gateway connection
- json
- JSON parsing shim — conditionally backed by
serde_json(default) orsimd-json(when thesimd_jsonfeature flag is enabled). - mention
- Mention and ID parsing utilities.
- message_
builder - Message builder for ergonomic message sending
- modal
- Quick modal builder for Discord interactions.
- operations
- Operations module - provides specialized operation traits for DiscordUser
- permissions
- Effective permission calculation.
- proto
- Protobuf encoding for Discord user settings (PreloadedUserSettings proto)
- route
- typed_
events - Typed event definitions and handlers for Discord gateway events
- typemap
- TypeMap — type-safe shared state for event handlers.
- types
- Core Discord types and data structures
- utils
- Miscellaneous utility helpers.
- validate
- Model-level validation — catches Discord constraint violations before HTTP.