Expand description
VaidCord — Rust SDK.
Layers (see UNITED.md at the repository root):
gateway— resilient websocket client (heartbeat task, RESUME, backoff reconnect, typedIntents).bot— the high-levelBotfacade wiring gateway dispatch -> parsedEvents -> theDispatcher.router/dispatcher— handler registry with filters, middleware ((event, next)semantics) and router nesting; middleware chains are precomposed at include-time.filters— small predicates AND’d per route, with value extraction.- [
middleware] — runs around the matched handler. models— typed serde models (unknown fields ignored).voice— voice gateway v8, UDP/IP discovery, RTP, transport encryption, frame pacing, audio sources and the receive path.
Re-exports§
pub use bot::Bot;pub use bot::BotBuilder;pub use client::Client;pub use client::RequestParts;pub use config::Config;pub use dispatcher::Dispatcher;pub use error::DiscordApiErrorBody;pub use error::Error;pub use events::Event;pub use events::EventKind;pub use extract::Args;pub use extract::Captures;pub use extract::Command;pub use extract::Content;pub use extract::ExtractBag;pub use extract::FromHandlerArg;pub use middleware::Middleware;pub use middleware::Next;pub use middleware::middleware;pub use filters::FilterOutcome;pub use filters::MessageFilter;pub use filters::and;pub use filters::command;pub use filters::command_help;pub use filters::command_help_with_prefixes;pub use filters::command_settings;pub use filters::command_settings_with_prefixes;pub use filters::command_start;pub use filters::command_start_with_prefixes;pub use filters::command_with_prefixes;pub use filters::not;pub use filters::or;pub use formatter::bold;pub use formatter::code_block;pub use formatter::escape_markdown;pub use formatter::inline_code;pub use formatter::italic;pub use formatter::mention_channel;pub use formatter::mention_role;pub use formatter::mention_user;pub use gateway::GatewayClient;pub use gateway::GatewayCloseAction;pub use gateway::GatewayConnection;pub use gateway::GatewayDispatch;pub use gateway::GatewayEvent;pub use gateway::GatewayHandle;pub use gateway::GuildMembersRequest;pub use gateway::Intents;pub use gateway::PresenceUpdate;pub use gateway::classify_gateway_close_code;pub use http::RateLimitInfo;pub use http::parse_rate_limit_headers;pub use http::route_bucket_key;pub use models::Channel;pub use models::Embed;pub use models::Guild;pub use models::Interaction;pub use models::InteractionResponse;pub use models::Member;pub use models::Message;pub use models::MessagePayload;pub use models::Ready;pub use models::Role;pub use models::User;pub use router::HandlerResult;pub use router::MessageHandler;pub use router::MessageHandlerDef;pub use router::Router;pub use router::content_starts_with;pub use voice::DaveIdentifyConfig;pub use voice::VoiceGatewayCloseCode;pub use voice::VoiceGatewayOpcode;
Modules§
- bot
- High-level bot runner: gateway dispatch -> parsed models -> dispatcher.
- client
- Discord REST client with per-route rate-limit buckets and retries.
- config
- dispatcher
- Standalone dispatcher with precomputed middleware chains.
- error
- events
- Typed gateway events dispatched through routers and middleware.
- extract
- filters
- formatter
- gateway
- Discord gateway (websocket) client.
- http
- HTTP rate limiting: per-route buckets fed by
X-RateLimit-*headers. - middleware
- Middleware with
(event, next)semantics. - models
- Typed gateway/REST models. All deserializers ignore unknown fields so the SDK stays tolerant of Discord API additions.
- router
- Handler registry with filters, middleware and nesting.
- voice
- Voice transport foundations.
Macros§
- command
- register_
on_ message - Register a handler with the router using a fluent multi-filter syntax.