Enum circe::Command [−][src]
pub enum Command {
JOIN(String),
MODE(String, Option<String>),
OTHER(String),
PING(String),
PRIVMSG(String, String),
// some variants omitted
}
Expand description
IRC commands
Variants
JOIN(String)
Joins a channel
client.write_command(Command::JOIN("#main".to_string()))?;
Tuple Fields of JOIN
0: String
Channel
Sets the mode of the user
client.write_command(Command::MODE("#main".to_string(), Some("+B".to_string())))?;
If the MODE is not given (e.g. None), then the client will send “MODE target”
OTHER(String)
Everything that is not a command
Tuple Fields of OTHER
0: String
PING(String)
Ping another user or the server
Tuple Fields of PING
0: String
target
Sends a message in a channel
client.write_command(Command::PRIVMSG("#main".to_string(), "This is an example message".to_string()))?;