1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Matrix implementation for botkit
//!
//! This crate provides Matrix platform support for the botkit unified bot framework.
//! It uses the `matrix-sdk` crate for protocol handling, including E2E encryption.
//!
//! # Example
//! ```ignore
//! use botkit_matrix::{MatrixBot, MatrixConfig};
//! use botkit_core::extractor::User;
//!
//! async fn ping() -> &'static str { "Pong!" }
//! async fn greet(user: User) -> String { format!("Hello, {}!", user.name) }
//!
//! let config = MatrixConfig::new("https://matrix.org")
//! .password_auth("@bot:matrix.org", "password")
//! .command_prefix("!");
//!
//! MatrixBot::new(config)
//! .command("ping", ping)
//! .command("greet", greet)
//! .reaction("👍", on_thumbsup)
//! .run()
//! .await
//! .unwrap();
//! ```
use getrandom as _;
pub use MatrixBot;
pub use MatrixClient;
pub use ;
pub use MatrixContextData;
// Re-export commonly used matrix-sdk types for convenience
pub use ;
pub use ;