sparkle_interactions 0.16.0

Safe, concise Discord interaction handling for Twilight
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::sync::Arc;

use twilight_http::Client;
use twilight_model::id::Id;

use crate::InteractionHandle;

#[test]
fn test_data_integrity() {
    let client = Client::new("a".to_owned());
    let handle = InteractionHandle::new(Arc::new(client), Id::new(1), Id::new(1), "a".to_owned());
    #[expect(clippy::redundant_clone, reason = "cloned to test data integrity")]
    let handle_clone = handle.clone();

    handle.set_is_responded(true);
    assert_eq!(handle.is_responded(), handle_clone.is_responded());
}