[−][src]Macro twitch_irc::irc
Allows quick creation of simple IRC messages using a command and optional parameters.
The given command and parameters have to implement From<T> for String
if they are not
already of type String
.
Example
use twitch_irc::irc; use twitch_irc::message::AsRawIRC; let msg = irc!["PRIVMSG", "#sodapoppin", "Hello guys!"]; assert_eq!(msg.command, "PRIVMSG"); assert_eq!(msg.params, vec!["#sodapoppin".to_owned(), "Hello guys!".to_owned()]); assert_eq!(msg.as_raw_irc(), "PRIVMSG #sodapoppin :Hello guys!");