diff --git a/src/format.rs b/src/format.rs index 7d65083..3cfec15 100644 --- a/src/format.rs +++ b/src/format.rs @@ -66,6 +66,7 @@ impl std::fmt::Display for Color { } } +#[derive(Clone)] pub struct Msg(String); impl std::fmt::Display for Msg { @@ -96,4 +97,8 @@ impl Msg { self.0 += &Format::Plain.to_string(); self } + pub fn as_action(mut self) -> Self { + self.0 = format!("\x01ACTION {}\x01", self.0); + self + } }