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