[−][src]Struct ttv_chat::messages::Privmsg
Message sent by a user
Implementations
impl<'a> Privmsg<'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 name(&self) -> &str
[src]
User who sent this messages
pub fn channel(&self) -> &str
[src]
Channel this message was sent on
pub fn data(&self) -> &str
[src]
Data that the user provided
pub fn ctcp(&self) -> Option<Ctcp<'_>>
[src]
Gets the 'CTCP' kind associated with this message, if any
pub fn is_action(&self) -> bool
[src]
Whether this message was an Action (a /me
or /action
)
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 bits(&self) -> Option<u64>
[src]
How many bits were 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(&'a self) -> Option<&'a str>
[src]
Returns the display name of the user, if set.
Users can changed the casing and encoding of their names, if they choose to.
By default, their display name is not set. If the user foo changes their display name to FOO then this'll return that FOO.
Otherwise it'll return None
.
pub fn emotes(&self) -> Vec<Emotes>
[src]
Emotes attached to this message
pub fn is_broadcaster(&self) -> bool
[src]
Whether the user sending this message was a broadcaster
pub fn is_moderator(&self) -> bool
[src]
Whether the user sending this message was a moderator
pub fn is_vip(&self) -> bool
[src]
Whether the user sending this message was a vip
pub fn is_subscriber(&self) -> bool
[src]
Whether the user sending this message was a susbcriber
pub fn is_staff(&self) -> bool
[src]
Whether the user sending this message was a staff member
pub fn is_turbo(&self) -> bool
[src]
Whether the user sending this message had turbo
pub fn is_global_moderator(&self) -> bool
[src]
Whether the user sending this message was a global moderator
pub fn room_id(&self) -> Option<u64>
[src]
The id of the room this message was sent to
pub fn tmi_sent_ts(&self) -> Option<u64>
[src]
The timestamp of when this message was received by Twitch
pub fn user_id(&self) -> Option<u64>
[src]
The id of the user who sent this message
pub fn custom_reward_id(&self) -> Option<&str>
[src]
custom-reward-id
is returned on custom rewards set by broadcaster.
NOTE From the new community points rewards.
With no api from Twitch to retrieve proper name, looks like a UUID.
pub fn msg_id(&self) -> Option<&str>
[src]
The name of the custom channel reward.
For example, a highlighted message would be highlighted-message
NOTE From the new community points rewards.
Trait Implementations
impl<'a> Clone for Privmsg<'a>
[src]
impl<'a> Debug for Privmsg<'a>
[src]
impl<'a> From<Privmsg<'a>> for Commands<'a>
[src]
impl<'a> FromIrcMessage<'a> for Privmsg<'a>
[src]
type Error = MessageError
An error returned if this message could not be parsed.
fn from_irc(
msg: IrcMessage<'a>
) -> Result<Privmsg<'a>, <Privmsg<'a> as FromIrcMessage<'a>>::Error>
[src]
msg: IrcMessage<'a>
) -> Result<Privmsg<'a>, <Privmsg<'a> as FromIrcMessage<'a>>::Error>
fn into_inner(self) -> MaybeOwned<'a>
[src]
Consumes the message, returning the raw MaybeOwned<'_>
impl<'a> IntoOwned<'a> for Privmsg<'a>
[src]
type Output = Privmsg<'static>
The output type
fn into_owned(self) -> <Privmsg<'a> as IntoOwned<'a>>::Output
[src]
impl<'a> PartialEq<Privmsg<'a>> for Privmsg<'a>
[src]
impl<'a> StructuralPartialEq for Privmsg<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Privmsg<'a>
impl<'a> Send for Privmsg<'a>
impl<'a> Sync for Privmsg<'a>
impl<'a> Unpin for Privmsg<'a>
impl<'a> UnwindSafe for Privmsg<'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>,