Registry / http-client / twilight-http

twilight-http

JSON →
library0.17.1rscratesunverified

Discord REST API client for the Twilight ecosystem.

# Cargo.toml [dependencies] twilight-http = "0.17.1"
INSTALL
IMPORT
SIG · TWILIGHT-HTTP
T
twilight-http
http-clientrustv0.17.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
use twilight_http::Client;

Create a Discord HTTP client and fetch current user info.

use twilight_http::Client; #[tokio::main] async fn main() { let client = Client::new("YOUR_BOT_TOKEN"); let response = client.current_user().await.unwrap(); println!("User: {:?}", response); }
Debug
Known issues
gotchaRequires a Tokio async runtime; blocking calls will panic.
fix
Use #[tokio::main] or similar runtime.
affects: >=0.17.0
Upgrade
Version history
0.17.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
22
Resources
twilight-http — cargo add twilight-http · libregistry