use crate::BoxError;
use asimov_protocol::Topic;
use clientele::{StandardOptions, crates::clap::Subcommand};
use std::string::String;
#[derive(Debug, Subcommand)]
pub enum MessageCommand {
Send {
recipient: Topic,
message: String,
#[arg(long)]
ticket: Option<String>,
},
}
impl MessageCommand {
pub async fn run(&self, flags: &StandardOptions) -> Result<(), BoxError> {
use MessageCommand::*;
match self {
Send {
recipient,
message,
ticket,
} => send(recipient, message, ticket, flags).await,
}
}
}
mod send;
pub use send::*;