Enum async_circe::commands::Command [−][src]
pub enum Command {
Show 15 variants
ADMIN(String),
AWAY(String),
INVITE(String, String),
JOIN(String),
LIST(Option<String>, Option<String>),
MODE(String, Option<String>),
NAMES(String, Option<String>),
NICK(String),
OPER(String, String),
OTHER(String),
PART(String),
PING(String),
PRIVMSG(String, String, String),
QUIT(String),
TOPIC(String, Option<String>),
// some variants omitted
}
Expand description
Commands that can be send or recived from an IRC server.
Variants
ADMIN(String)
Tuple Fields
0: String
Target
Request information about the admin of a given server.
client.admin("libera.chat").await?;
Errors
Returns IO errors from the TcpStream.
AWAY(String)
Tuple Fields
0: String
Message
Set the status of the client.
client.away("afk").await?;
INVITE(String, String)
Invite someone to a channel.
client.invite("liblemonirc", "#async-circe").await?;
JOIN(String)
Tuple Fields
0: String
Channel
Join a channel.
client.join("#chaos").await?;
LIST(Option<String>, Option<String>)
List available channels on an IRC, or users in a channel.
client.list(None, None).await?;
MODE(String, Option<String>)
Set the mode for a user.
client.mode("test", Some("+B")).await?;
NAMES(String, Option<String>)
Get all the people online in channels.
client.names("#chaos,#async-circe", None).await?;
NICK(String)
Tuple Fields
0: String
Nickname
Change your nickname on a server.
client.nick("Not async-circe").await?;
OPER(String, String)
Authentificate as an operator on a server.
client.oper("username", "password").await?;
OTHER(String)
Tuple Fields
0: String
Everything that is not a command
PART(String)
Tuple Fields
0: String
Target
Leave a channel.
client.part("#chaos").await?;
PING(String)
Tuple Fields
0: String
Tests the presence of a connection to a server.
client.ping("libera.chat", None).await?;
PRIVMSG(String, String, String)
Send a message to a channel.
client.privmsg("#chaos", "Hello").await?;
QUIT(String)
Tuple Fields
0: String
Leave message
Leave the IRC server you are connected to.
client.quit(None).await?;
TOPIC(String, Option<String>)
Get the topic of a channel.
Example
client.topic("#chaos", None).await?;
Set the topic of a channel.
Example
client.topic("#chaos", Some("main channel")).await?;
Errors
Returns IO errors from the TcpStream.
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