Skip to main content

EventType

Enum EventType 

Source
#[non_exhaustive]
pub enum EventType {
Show 77 variants AutomodMessageHold, AutomodMessageUpdate, AutomodSettingsUpdate, AutomodTermsUpdate, ChannelAdBreakBegin, ChannelBitsUse, ChannelChatClear, ChannelChatClearUserMessages, ChannelChatMessage, ChannelChatMessageDelete, ChannelChatNotification, ChannelChatUserMessageHold, ChannelChatUserMessageUpdate, ChannelChatSettingsUpdate, ChannelCharityCampaignDonate, ChannelCharityCampaignProgress, ChannelCharityCampaignStart, ChannelCharityCampaignStop, ChannelUpdate, ChannelFollow, ChannelSubscribe, ChannelCheer, ChannelBan, ChannelUnban, ChannelUnbanRequestCreate, ChannelUnbanRequestResolve, ChannelPointsAutomaticRewardRedemptionAdd, ChannelPointsCustomRewardAdd, ChannelPointsCustomRewardUpdate, ChannelPointsCustomRewardRemove, ChannelPointsCustomRewardRedemptionAdd, ChannelPointsCustomRewardRedemptionUpdate, ChannelPollBegin, ChannelPollProgress, ChannelPollEnd, ChannelPredictionBegin, ChannelPredictionProgress, ChannelPredictionLock, ChannelPredictionEnd, ChannelShoutoutCreate, ChannelShoutoutReceive, ChannelRaid, ChannelSharedChatBegin, ChannelSharedChatEnd, ChannelSharedChatUpdate, ChannelSubscriptionEnd, ChannelSubscriptionGift, ChannelSubscriptionMessage, ChannelSuspiciousUserMessage, ChannelSuspiciousUserUpdate, ChannelShieldModeBegin, ChannelShieldModeEnd, ChannelGoalBegin, ChannelGoalProgress, ChannelGoalEnd, ChannelGuestStarSessionBegin, ChannelGuestStarSessionEnd, ChannelGuestStarSettingsUpdate, ChannelGuestStarGuestUpdate, ChannelHypeTrainBegin, ChannelHypeTrainProgress, ChannelHypeTrainEnd, ChannelModerate, ChannelModeratorAdd, ChannelModeratorRemove, ChannelVipAdd, ChannelWarningAcknowledge, ChannelWarningSend, ChannelVipRemove, ConduitShardDisabled, ExtensionBitsTransactionCreate, StreamOnline, StreamOffline, UserUpdate, UserAuthorizationRevoke, UserAuthorizationGrant, UserWhisperMessage,
}
Available on crate feature eventsub only.
Expand description

Event Types

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AutomodMessageHold

automod.message.hold: a message was caught by automod for review

§

AutomodMessageUpdate

automod.message.update: a message in the automod queue had its status changed

§

AutomodSettingsUpdate

automod.settings.update: a notification is sent when a broadcaster’s automod settings are updated.

§

AutomodTermsUpdate

automod.terms.update: a notification is sent when a broadcaster’s automod terms are updated. Changes to private terms are not sent.

§

ChannelAdBreakBegin

channel.ad_break.begin: a user runs a midroll commercial break, either manually or automatically via ads manager.

§

ChannelBitsUse

channel.bits.use: sends a notification whenever Bits are used on a channel.

§

ChannelChatClear

channel.chat.clear: a moderator or bot clears all messages from the chat room.

§

ChannelChatClearUserMessages

channel.chat.clear_user_messages: a moderator or bot clears all messages for a specific user.

§

ChannelChatMessage

channel.chat.message: any user sends a message to a specific chat room.

§

ChannelChatMessageDelete

channel.chat.message_delete: a moderator removes a specific message.

§

ChannelChatNotification

channel.chat.notification: an event that appears in chat occurs, such as someone subscribing to the channel or a subscription is gifted.

§

ChannelChatUserMessageHold

channel.chat.user_message_hold: a user’s message is caught by automod.

§

ChannelChatUserMessageUpdate

channel.chat.user_message_update: a user’s message’s automod status is updated.

§

ChannelChatSettingsUpdate

channel.chat_settings.update: a broadcaster’s chat settings are updated.

§

ChannelCharityCampaignDonate

channel.charity_campaign.donate: a user donates to the broadcaster’s charity campaign.

§

ChannelCharityCampaignProgress

channel.charity_campaign.progress: progress is made towards the campaign’s goal or when the broadcaster changes the fundraising goal.

§

ChannelCharityCampaignStart

channel.charity_campaign.start: a broadcaster starts a charity campaign.

§

ChannelCharityCampaignStop

channel.charity_campaign.stop: a broadcaster stops a charity campaign.

§

ChannelUpdate

channel.update: subscription type sends notifications when a broadcaster updates the category, title, mature flag, or broadcast language for their channel.

§

ChannelFollow

channel.follow: a specified channel receives a follow.

§

ChannelSubscribe

channel.subscribe: a specified channel receives a subscriber. This does not include resubscribes.

§

ChannelCheer

channel.cheer: a user cheers on the specified channel.

§

ChannelBan

channel.ban: a viewer is banned from the specified channel.

§

ChannelUnban

channel.unban: a viewer is unbanned from the specified channel.

§

ChannelUnbanRequestCreate

channel.unban_request.create: a user creates an unban request.

§

ChannelUnbanRequestResolve

channel.unban_request.resolve: an unban request has been resolved.

§

ChannelPointsAutomaticRewardRedemptionAdd

channel.channel_points_automatic_reward_redemption.add: a viewer has redeemed an automatic channel points reward on the specified channel.

§

ChannelPointsCustomRewardAdd

channel.channel_points_custom_reward.add: a custom channel points reward has been created for the specified channel.

§

ChannelPointsCustomRewardUpdate

channel.channel_points_custom_reward.update: a custom channel points reward has been updated for the specified channel.

§

ChannelPointsCustomRewardRemove

channel.channel_points_custom_reward.remove: a custom channel points reward has been removed from the specified channel.

§

ChannelPointsCustomRewardRedemptionAdd

channel.channel_points_custom_reward_redemption.add: a viewer has redeemed a custom channel points reward on the specified channel.

§

ChannelPointsCustomRewardRedemptionUpdate

channel.channel_points_custom_reward_redemption.update: a redemption of a channel points custom reward has been updated for the specified channel.

§

ChannelPollBegin

channel.poll.begin: a poll begins on the specified channel.

§

ChannelPollProgress

channel.poll.progress: a user responds to a poll on the specified channel.

§

ChannelPollEnd

channel.poll.end: a poll ends on the specified channel.

§

ChannelPredictionBegin

channel.prediction.begin: a Prediction begins on the specified channel

§

ChannelPredictionProgress

channel.prediction.progress: a user participates in a Prediction on the specified channel.

§

ChannelPredictionLock

channel.prediction.lock: a Prediction is locked on the specified channel.

§

ChannelPredictionEnd

channel.prediction.end: a Prediction ends on the specified channel.

§

ChannelShoutoutCreate

channel.shoutout.create: a specified broadcaster sends a Shoutout.

§

ChannelShoutoutReceive

channel.shoutout.receive: a specified broadcaster receives a Shoutout.

§

ChannelRaid

channel.raid: a broadcaster raids another broadcaster’s channel.

§

ChannelSharedChatBegin

channel.shared_chat.begin: a channel becomes active in an active shared chat session.

§

ChannelSharedChatEnd

channel.shared_chat.end: a channel leaves a shared chat session or the session ends.

§

ChannelSharedChatUpdate

channel.shared_chat.update: the active shared chat session the channel is in changed.

§

ChannelSubscriptionEnd

channel.subscription.end: a subscription to the specified channel expires.

§

ChannelSubscriptionGift

channel.subscription.gift: a user gives one or more gifted subscriptions in a channel.

§

ChannelSubscriptionMessage

channel.subscription.message: a user sends a resubscription chat message in a specific channel

§

ChannelSuspiciousUserMessage

channel.suspicious_user.message: a chat message has been sent from a suspicious user.

§

ChannelSuspiciousUserUpdate

channel.suspicious_user.update: a suspicious user has been updated.

§

ChannelShieldModeBegin

channel.shield_mode.begin: a channel activates shield mode

§

ChannelShieldModeEnd

channel.shield_mode.end: a channel deactivates shield mode

§

ChannelGoalBegin

channel.goal.begin: a goal begins on the specified channel.

§

ChannelGoalProgress

channel.goal.progress: a goal makes progress on the specified channel.

§

ChannelGoalEnd

channel.goal.end: a goal ends on the specified channel.

§

ChannelGuestStarSessionBegin

channel.guest_star_session.begin: the host begins a new Guest Star session.

§

ChannelGuestStarSessionEnd

channel.guest_star_session.end: a running Guest Star session is ended by the host, or automatically by the system.

§

ChannelGuestStarSettingsUpdate

channel.guest_star_settings.update: the host preferences for Guest Star have been updated.

§

ChannelGuestStarGuestUpdate

channel.guest_star_guest.update: a guest or a slot is updated in an active Guest Star session.

§

ChannelHypeTrainBegin

channel.hype_train.begin: a hype train begins on the specified channel.

§

ChannelHypeTrainProgress

channel.hype_train.progress: a hype train makes progress on the specified channel.

§

ChannelHypeTrainEnd

channel.hype_train.end: a hype train ends on the specified channel.

§

ChannelModerate

channel.moderate: a moderator performs a moderation action in a channel.

§

ChannelModeratorAdd

channel.moderator.add: a user is given moderator privileges on a specified channel.

§

ChannelModeratorRemove

channel.moderator.remove: a user has moderator privileges removed on a specified channel.

§

ChannelVipAdd

channel.vip.add: a VIP is added to the channel.

§

ChannelWarningAcknowledge

channel.warning.acknowledge: a warning is acknowledged by a user.

§

ChannelWarningSend

channel.warning.send: a warning is sent to a user.

§

ChannelVipRemove

channel.vip.remove: a VIP is removed from the channel.

§

ConduitShardDisabled

conduit.shard.disabled: sends a notification when eventsub disables a shard due to the status of the underlying transport changing.

§

ExtensionBitsTransactionCreate

extension.bits_transaction.create: an extension triggers a bits transaction

§

StreamOnline

stream.online: the specified broadcaster starts a stream.

§

StreamOffline

stream.offline: the specified broadcaster stops a stream.

§

UserUpdate

user.update: user updates their account.

§

UserAuthorizationRevoke

user.authorization.revoke: a user has revoked authorization for your client id. Use this webhook to meet government requirements for handling user data, such as GDPR, LGPD, or CCPA.

§

UserAuthorizationGrant

user.authorization.grant: a user’s authorization has been granted to your client id.

§

UserWhisperMessage

user.whisper.message: a user receives a whisper.

Implementations§

Source§

impl EventType

Source

pub const fn to_str(&self) -> &'static str

Get the event string of this event.

fn main() {
    assert_eq!(EventType::ChannelUpdate.to_str(), "channel.update");
    assert_eq!(EventType::ChannelUnban.to_str(), "channel.unban");
}

Trait Implementations§

Source§

impl Clone for EventType

Source§

fn clone(&self) -> EventType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EventType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EventType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for EventType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for EventType

Source§

type Err = EventTypeParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for EventType

Source§

fn eq(&self, other: &EventType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EventType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for EventType

Source§

impl Eq for EventType

Source§

impl StructuralPartialEq for EventType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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