src/commands/mod.rs

fd2dad00ba83edae7e1f5b8312904c1989a45ab4
weechat-matrix-rs/src/commands/mod.rs history · blame · raw

22 lines · 401 bytes

 1use crate::config::ConfigHandle;
 2use crate::Servers;
 3use weechat::hooks::Command;
 4
 5mod matrix;
 6
 7use matrix::MatrixCommand;
 8
 9pub struct Commands {
10    _matrix: Command,
11}
12
13impl Commands {
14    pub fn hook_all(
15        servers: &Servers,
16        config: &ConfigHandle,
17    ) -> Result<Commands, ()> {
18        Ok(Commands {
19            _matrix: MatrixCommand::create(servers, config)?,
20        })
21    }
22}