diff --git a/cove-tui/src/euph/api/room_cmds.rs b/cove-tui/src/euph/api/room_cmds.rs index 02dddd4..f4653e3 100644 --- a/cove-tui/src/euph/api/room_cmds.rs +++ b/cove-tui/src/euph/api/room_cmds.rs @@ -46,6 +46,14 @@ pub struct Nick { pub name: String, } +impl Nick { + pub fn new(name: S) -> Self { + Self { + name: name.to_string(), + } + } +} + /// Confirms the [`Nick`] command. /// /// Returns the session's former and new names (the server may modify the @@ -98,6 +106,22 @@ pub struct Send { pub parent: Option, } +impl Send { + pub fn new(content: S) -> Self { + Self { + content: content.to_string(), + parent: None, + } + } + + pub fn reply(parent: Snowflake, content: S) -> Self { + Self { + content: content.to_string(), + parent: Some(parent), + } + } +} + /// The message that was sent. /// /// this includes the message id, which was populated by the server.