Struct async_circe::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
An IRC client
Implementations
Read data coming from the IRC as a commands::Command
.
if let Ok(ref command) = client.read().await {
if let Command::OTHER(line) = command {
print!("{}", line);
}
}
Errors
Returns error if there are no new messages. This should not be taken as an actual error, because nothing went wrong.
👎 Deprecated
Send a commands::Command
to the IRC.
Not reccomended to use, use the helper functions instead.
client.write_command(Command::PRIVMSG("".to_string(), "#main".to_string(), "Hello".to_string())).await?;
Errors
Returns error if the client could not write to the stream.
Helper function for requesting information about the ADMIN of an IRC server
client.admin("192.168.178.100").await?;
Errors
Returns error if the client could not write to the stream.
Helper function for setting the users status to AWAY
client.away("AFK").await?;
Errors
Returns error if the client could not write to the stream.
Helper function to INVITE people to a channels
client.invite("liblemonirc", "#circe").await?;
Errors
Returns error if the client could not write to the stream.
Helper function for sending JOINs.
client.join("#main").await?;
Errors
Returns error if the client could not write to the stream.
Helper function for LISTing
channels and modes
client.list(None, None).await?;
Errors
Returns error if the client could not write to the stream.
Helper function for sending MODEs.
client.mode("test", Some("+B")).await?;
Errors
Returns error if the client could not write to the stream.
Helper function for getting all nicknames in a channel
client.names("#main,#circe", None).await?;
Errors
Returns error if the client could not write to the stream.
Helper function for changeing your nick
client.nick("Not circe").await?;
Errors
Returns error if the client could not write to the stream.
Helper function to try to register as a channel operator
client.oper("username", "password").await?;
Errors
Returns error if the client could not write to the stream.
Helper function for leaving channels.
client.part("#main").await?;
Errors
Returns error if the client could not write to the stream.
Tests the presence of a connection.
client.ping("libera.chat", None).await?;
Errors
Returns error if the client could not write to the stream.
Helper function for sending PRIVMSGs.
client.privmsg("#main", "Hello").await?;
Errors
Returns error if the client could not write to the stream.
Helper function for leaving the IRC server and shutting down the TCP stream afterwards.
client.quit(None).await?;
Errors
Returns error if the client could not write to the stream.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
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