tenebrous-dicebot/src/context.rs

15 lines
346 B
Rust
Raw Normal View History

use crate::db::Database;
2020-11-22 20:52:44 +00:00
use matrix_sdk::Client;
use matrix_sdk::Room;
/// A context carried through the system providing access to things
/// like the database.
#[derive(Clone)]
pub struct Context<'a> {
2020-10-17 15:18:51 +00:00
pub db: Database,
2020-11-22 20:52:44 +00:00
pub matrix_client: &'a Client,
pub room: &'a Room,
pub username: &'a str,
pub message_body: &'a str,
}