Enum async_circe::commands::Command[][src]

pub enum Command {
Show 13 variants ADMIN(String), AWAY(String), INVITE(StringString), JOIN(String), LIST(Option<String>, Option<String>), MODE(StringOption<String>), NAMES(StringOption<String>), OPER(StringString), OTHER(String), PART(String), PRIVMSG(StringStringString), QUIT(String), TOPIC(StringOption<String>), // some variants omitted
}
Expand description

IRC commands

Variants

ADMIN(String)

Tuple Fields

0: String

Target

Gets information about the admin of the IRC server.

client.admin("192.168.178.100").await?;

AWAY(String)

Tuple Fields

0: String

Message

Sets the user status to AWAY

client.away("AFK").await?;

INVITE(StringString)

Tuple Fields

0: String

User

1: String

Channel

Invite user to channel

client.invite("liblirc", "#circe").await?;

JOIN(String)

Tuple Fields

0: String

Channel

Joins a channel

client.join("#main").await?;

LIST(Option<String>, Option<String>)

Tuple Fields

0: Option<String>

Channel

1: Option<String>

Server to foreward request to

Lists all channels and their topics

client.list(None, None).await?;

MODE(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Mode

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(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Server to foreward request to

List all nicknames visiable to the Client

client.names("#main,#circe", None).await?;

OPER(StringString)

Tuple Fields

0: String

Username

1: String

Password

Attempts to identify as a channel operator

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("#main").await?;

PRIVMSG(StringStringString)

Tuple Fields

0: String

Source Nickname

1: String

Channel

2: String

Message

Sends a message in a channel

client.privmsg("#main", "This is an example message").await?;

QUIT(String)

Tuple Fields

0: String

Leave message

Leaves the IRC

client.quit(Some("Leaving...")).await?;

TOPIC(StringOption<String>)

Tuple Fields

0: String

Channel

1: Option<String>

Topic

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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