src/commands/mod.rs
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}