document configuration

This commit is contained in:
Antoine Martin 2021-02-02 06:39:05 +01:00
parent 3f08ec6b26
commit 28c22ffad7

View file

@ -57,6 +57,7 @@ impl EventEmitter for AutoJoinBot {
} }
} }
} }
async fn on_stripped_state_member( async fn on_stripped_state_member(
&self, &self,
room: RoomState, room: RoomState,
@ -169,11 +170,16 @@ struct Opts {
config: PathBuf, config: PathBuf,
} }
/// Holds the configuration for the bot.
#[derive(Deserialize)] #[derive(Deserialize)]
struct Config { struct Config {
/// The URL for the homeserver we should connect to
homeserver: Url, homeserver: Url,
/// The bot's account username
username: String, username: String,
/// The bot's account password
password: String, password: String,
/// Path to a directory where the bot will store Matrix state and current session information.
state_dir: PathBuf, state_dir: PathBuf,
} }