[−][src]Struct twitchchat::commands::UserNotice
Announces Twitch-specific events to the channel (e.g., a user's subscription notification).
Fields
IRC tags
channel: String
The channel this event is for
message: Option<String>
Extra data provided by twitch
Methods
impl UserNotice
[src]
pub fn channel(&self) -> &str
[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 badges(&self) -> Vec<Badge>
[src]
List of badges attached to this message
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]
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. TODO option?
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 Clone for UserNotice
[src]
fn clone(&self) -> UserNotice
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<UserNotice> for UserNotice
[src]
fn eq(&self, other: &UserNotice) -> bool
[src]
fn ne(&self, other: &UserNotice) -> bool
[src]
impl From<Message> for UserNotice
[src]
impl Debug for UserNotice
[src]
Auto Trait Implementations
impl Send for UserNotice
impl Sync for UserNotice
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,