continuwuity/src/admin/check/mod.rs
Jason Volk 2468e0c3de unconditionally derive Debug on subcommand enums
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00

18 lines
404 B
Rust

mod commands;
use clap::Subcommand;
use conduit::Result;
use ruma::events::room::message::RoomMessageEventContent;
use self::commands::*;
#[derive(Debug, Subcommand)]
pub(super) enum CheckCommand {
AllUsers,
}
pub(super) async fn process(command: CheckCommand, body: Vec<&str>) -> Result<RoomMessageEventContent> {
Ok(match command {
CheckCommand::AllUsers => check_all_users(body).await?,
})
}