[−][src]Struct ttv_chat::messages::UserNotice
Announces Twitch-specific events to the channel (e.g., a user's subscription notification).
Implementations
impl<'a> UserNotice<'a>
[src]
pub fn raw(&self) -> &str
[src]
Get the raw message
pub fn tags(&self) -> Tags<'_>
[src]
Get a view of parsable tags
pub fn channel(&self) -> &str
[src]
The channel that this event is happening on
pub fn message(&self) -> Option<&str>
[src]
Optional message attached to the event
pub fn badge_info(&'a self) -> Vec<Badge<'a>>
[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(&'a self) -> Vec<Badge<'a>>
[src]
Badges attached to this message
pub fn color(&self) -> Option<Color>
[src]
The user's color, if set
pub fn display_name(&self) -> Option<&str>
[src]
The user's display name, if set
pub fn emotes(&self) -> Vec<Emotes>
[src]
Emotes attached to this message
pub fn id(&self) -> Option<&str>
[src]
A unique id (UUID) attached to this message
(this is used for message localization)
pub fn login(&self) -> Option<&str>
[src]
The name of the user who sent this notice
pub fn is_moderator(&self) -> bool
[src]
Whether this user is a moderator
pub fn msg_id(&'a self) -> Option<NoticeType<'a>>
[src]
The kind of notice this message is
pub fn room_id(&self) -> Option<u64>
[src]
The id of the room for this notice
pub fn tmi_sent_ts(&self) -> Option<u64>
[src]
The timestamp which twitch received this message
pub fn user_id(&self) -> Option<u64>
[src]
User id of the user who sent this notice
pub fn system_msg(&self) -> Option<String>
[src]
The message printed in chat along with this notice
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_promo_gift_total(&self) -> Option<u64>
[src]
(Sent only on anongiftpaidupgrade, giftpaidupgrade) The number of gifts the gifter has given during the promo indicated by msg-param-promo-name.
pub fn msg_param_promo_name(&self) -> Option<&str>
[src]
(Sent only on anongiftpaidupgrade, giftpaidupgrade) The subscriptions promo, if any, that is ongoing; e.g. Subtember 2018.
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_sender_login(&self) -> Option<&str>
[src]
(Sent only on giftpaidupgrade) The login of the user who gifted the subscription.
pub fn msg_param_sender_name(&self) -> Option<&str>
[src]
(Sent only on giftpaidupgrade) The display name of the user who gifted the subscription.
pub fn msg_param_should_share_streak(&self) -> Option<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(&'a self) -> Option<SubPlan<'a>>
[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 msg_param_threshold(&self) -> Option<u64>
[src]
(Sent only on bitsbadgetier) The tier of the bits badge the user just earned; e.g. 100, 1000, 10000.
Trait Implementations
impl<'a> Clone for UserNotice<'a>
[src]
fn clone(&self) -> UserNotice<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for UserNotice<'a>
[src]
impl<'a> From<UserNotice<'a>> for Commands<'a>
[src]
fn from(msg: UserNotice<'a>) -> Commands<'a>
[src]
impl<'a> FromIrcMessage<'a> for UserNotice<'a>
[src]
type Error = MessageError
An error returned if this message could not be parsed.
fn from_irc(
msg: IrcMessage<'a>
) -> Result<UserNotice<'a>, <UserNotice<'a> as FromIrcMessage<'a>>::Error>
[src]
msg: IrcMessage<'a>
) -> Result<UserNotice<'a>, <UserNotice<'a> as FromIrcMessage<'a>>::Error>
fn into_inner(self) -> MaybeOwned<'a>
[src]
Consumes the message, returning the raw MaybeOwned<'_>
impl<'a> IntoOwned<'a> for UserNotice<'a>
[src]
type Output = UserNotice<'static>
The output type
fn into_owned(self) -> <UserNotice<'a> as IntoOwned<'a>>::Output
[src]
impl<'a> PartialEq<UserNotice<'a>> for UserNotice<'a>
[src]
fn eq(&self, other: &UserNotice<'a>) -> bool
[src]
fn ne(&self, other: &UserNotice<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for UserNotice<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for UserNotice<'a>
impl<'a> Send for UserNotice<'a>
impl<'a> Sync for UserNotice<'a>
impl<'a> Unpin for UserNotice<'a>
impl<'a> UnwindSafe for UserNotice<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> IntoIrcMessage<'a> for T where
T: 'a + FromIrcMessage<'a>,
[src]
T: 'a + FromIrcMessage<'a>,
fn into_irc(self) -> IrcMessage<'a>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,