added action msg format
This commit is contained in:
parent
bebde517ec
commit
2a17c3b402
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user