[][src]Struct twitchchat::commands::UserNotice

pub struct UserNotice { /* fields omitted */ }

Announces Twitch-specific events to the channel (e.g., a user's subscription notification).

Methods

impl UserNotice[src]

pub fn tags(&self) -> &Tags[src]

IRC tags

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

The channel this event is for

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

The message. This is omitted if the user did not enter a message.

impl UserNotice[src]

pub fn badge_info(&self) -> Vec<BadgeInfo>[src]

Metadata related to the chat badges

Currently used only for subscriber, to indicate the exact number of months the user has been a subscriber.

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

List of badges attached to this message

pub fn color(&self) -> Option<Color>[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]

A unique id (UUID) attached to this message (used for Localization)

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

The name of the user who sent the notice.

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

Whether this user is a moderator

pub fn msg_id(&self) -> NoticeType[src]

The type of notice, see NoticeType

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

(Sent only on sub, resub) The total number of months the user has subscribed. This is the same as msg-param-months but sent for different types of user notices.

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

(Sent only on raid) The display name of the source user raiding this channel.

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

(Sent on only raid) The name of the source user raiding this channel.

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

(Sent only on subgift, anonsubgift) The total number of months the user has subscribed. This is the same as msg-param-cumulative-months but sent for different types of user notices.

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

(Sent only on subgift, anonsubgift) The display name of the subscription gift recipient.

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

(Sent only on subgift, anonsubgift) The user ID of the subscription gift recipient.

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

(Sent only on subgift, anonsubgift) The user name of the subscription gift recipient.

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

(Sent only on sub, resub) Boolean indicating whether users want their streaks to be shared.

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

(Sent only on sub, resub) The number of consecutive months the user has subscribed. This is 0 if msg-param-should-share-streak is 0.

pub fn msg_param_sub_plan(&self) -> Option<SubPlan>[src]

(Sent only on sub, resub, subgift, anonsubgift) The type of subscription plan being used. Valid values: Prime, 1000, 2000, 3000. 1000, 2000, and 3000 refer to the first, second, and third levels of paid subscriptions, respectively (currently $4.99, $9.99, and $24.99).

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

(Sent only on sub, resub, subgift, anonsubgift) The display name of the subscription plan. This may be a default name or one created by the channel owner.

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

(Sent only on raid) The number of viewers watching the source channel raiding this channel.

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

(Sent only on ritual) The name of the ritual this notice is for. Valid value: new_chatter.

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

The id for the room for this notice

pub fn system_msg(&self) -> String[src]

The message printed in chat along with this notice.

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

Timestamp of when the notice was sent

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

The id of the user who sent the notice

Trait Implementations

impl Tag for UserNotice[src]

impl PartialEq<UserNotice> for UserNotice[src]

impl Clone for UserNotice[src]

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

Performs copy-assignment from source. Read more

impl From<Message> for UserNotice[src]

impl Debug for UserNotice[src]

impl Serialize for UserNotice[src]

impl<'de> Deserialize<'de> for UserNotice[src]

Auto Trait Implementations

impl Send for UserNotice

impl Sync for UserNotice

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]