[][src]Struct twitchchat::commands::PrivMsg

pub struct PrivMsg {
    pub tags: Tags,
    pub user: String,
    pub channel: String,
    pub message: String,
    pub action: bool,
}

Send a message to a channel.

Fields

tags: Tags

IRC tags

user: String

The User that sent this message

channel: String

The channel this message was sent to

message: String

The message body

action: bool

Whether this message was an action (someone doing /me message)

Methods

impl PrivMsg[src]

pub fn user(&self) -> &str[src]

The irc name of the user (generally same as their twitch account name)

pub fn channel(&self) -> &str[src]

The channel this message was sent to

pub fn message(&self) -> &str[src]

The message body

pub fn is_action(&self) -> bool[src]

Whether this message was an action (someone doing /me message)

impl PrivMsg[src]

pub fn badges(&self) -> Vec<Badge>[src]

List of badges attached to the user/message

pub fn bits(&self) -> u64[src]

How many bits were attached (0 for None)

pub fn color(&self) -> Option<TwitchColor>[src]

The color of the user who sent this message, if set

pub fn display_name(&self) -> Option<&str>[src]

The display name of the user, if set

pub fn emotes(&self) -> Vec<Emotes>[src]

List of emotes found in the message body.

pub fn id(&self) -> Option<&str>[src]

The unique UUID for this mesage

pub fn moderator(&self) -> bool[src]

Whether this user was a moderator

pub fn room_id(&self) -> Option<u64>[src]

The id for the room

pub fn tmi_sent_ts(&self) -> Option<u64>[src]

The timestamp that this message was received by Twitch

pub fn user_id(&self) -> Option<u64>[src]

The id of the user who sent this message

Trait Implementations

impl Tag for PrivMsg[src]

impl PartialEq<PrivMsg> for PrivMsg[src]

impl From<Message> for PrivMsg[src]

impl Clone for PrivMsg[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PrivMsg[src]

Auto Trait Implementations

impl Send for PrivMsg

impl Sync for PrivMsg

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.