Enum async_circe::commands::Command [−][src]
pub enum Command {
Show 13 variants
ADMIN(String),
AWAY(String),
INVITE(String, String),
JOIN(String),
LIST(Option<String>, Option<String>),
MODE(String, Option<String>),
NAMES(String, Option<String>),
OPER(String, String),
OTHER(String),
PART(String),
PRIVMSG(String, String, String),
QUIT(String),
TOPIC(String, Option<String>),
// some variants omitted
}Expand description
IRC commands
Variants
ADMIN(String)
Tuple Fields
0: StringTarget
Gets information about the admin of the IRC server.
client.admin("192.168.178.100").await?;AWAY(String)
Tuple Fields
0: StringMessage
Sets the user status to AWAY
client.away("AFK").await?;INVITE(String, String)
Invite user to channel
client.invite("liblirc", "#circe").await?;JOIN(String)
Tuple Fields
0: StringChannel
Joins a channel
client.join("#main").await?;LIST(Option<String>, Option<String>)
Lists all channels and their topics
client.list(None, None).await?;MODE(String, Option<String>)
Sets the mode of the user
client.mode("test", Some("+B")).await?;If the MODE is not given (e.g. None), then the client will send “MODE target”
NAMES(String, Option<String>)
List all nicknames visiable to the Client
client.names("#main,#circe", None).await?;OPER(String, String)
Attempts to identify as a channel operator
client.oper("username", "password").await?;OTHER(String)
Tuple Fields
0: StringEverything that is not a command
PART(String)
Tuple Fields
0: StringTarget
Leave a channel
client.part("#main").await?;PRIVMSG(String, String, String)
Sends a message in a channel
client.privmsg("#main", "This is an example message").await?;QUIT(String)
Tuple Fields
0: StringLeave message
Leaves the IRC
client.quit(Some("Leaving...")).await?;TOPIC(String, Option<String>)
Sets or gets the topic of a channel
client.topic("#main", Some("main channel")).await?;Implementations
Creates a Command from a &str. Currently only [PING] and [PRIVMSG] are supported.
Panics
This function will panic if the IRCd sends malformed messages. Please contact the
maintainer of your IRCd if this happens.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Command
impl UnwindSafe for Command
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
