discord-user-rs 0.4.1

Discord self-bot client library — user-token WebSocket gateway and REST API, with optional read-only archival CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::{client::DiscordHttpClient, events::EventEmitter, gateway::Gateway};

/// Core context trait providing access to Discord services
pub trait DiscordContext {
    /// Get HTTP client reference
    fn http(&self) -> &DiscordHttpClient;
    /// Get events emitter reference
    fn events(&self) -> &EventEmitter;
    /// Get gateway reference
    fn gateway(&self) -> Option<&Gateway>;
}