Skip to main content

Events

Struct Events 

Source
#[non_exhaustive]
pub struct Events;
Expand description

The events a Client can emit, as typed values (D-222).

Pass one of these to Client::on. The names are those of discord.js’ Events (Events.MessageCreate, Events.GuildRoleUpdate, …); gateway dispatches discord.js has no event for are named after the dispatch (INTEGRATION_CREATE is IntegrationCreate).

See the module documentation for what handlers receive and in which order.

Implementations§

Source§

impl Events

Source

pub const ClientReady: ClientReady = ClientReady

The client is ready: fired once per login, at the READY of the last of its shards to become ready (D-224).

It does not wait for the guilds’ GUILD_CREATEs, so the cache may still be filling (discord.js waits for them). The payload is that shard’s READY: its user and application are the same on every shard, its guilds are that shard’s.

discord.js: Events.ClientReady (clientReady).

Source

pub const ShardReady: ShardReady = ShardReady

A shard’s session is ready (READY): after connecting, and again after every re-identify (not after a resume, see ShardResume).

The shard is Context::shard_id; the guilds in the payload arrive as GuildAvailable afterwards.

discord.js: Events.ShardReady (shardReady).

Source

pub const ShardResume: ShardResume = ShardResume

A shard resumed its session (RESUMED) after a reconnect; Discord replayed the events it missed, counted in ShardResume::replayed.

discord.js: Events.ShardResume (shardResume).

Source

pub const ShardReconnecting: ShardReconnecting = ShardReconnecting

A shard lost its connection and is reconnecting (it resumes when it can, otherwise it identifies again).

Fired at the first event after the connection was lost, at the latest at the new connection’s hello.

discord.js: Events.ShardReconnecting (shardReconnecting).

Source

pub const Invalidated: Invalidated = Invalidated

Discord invalidated a shard’s session (INVALID_SESSION that cannot be resumed): the shard identifies again, and the events in between are lost.

discord.js lists Events.Invalidated (invalidated) but v14 no longer emits it; here it marks a lost session.

Source

pub const ShardError: ShardError = ShardError

A shard hit an error it recovers from (a failed connection, a payload that could not be decoded, …); it reconnects or skips the payload by itself.

discord.js: Events.ShardError (shardError).

Source

pub const ShardDisconnect: ShardDisconnect = ShardDisconnect

A shard was closed by Discord with a code that forbids reconnecting (an invalid token, disallowed intents, …); the Client stops and login returns the error.

discord.js: Events.ShardDisconnect (shardDisconnect).

Source

pub const Raw: Raw = Raw

Every gateway dispatch, decoded, before the cache’s events and the derived ones.

Only handlers receive it; registering one costs a clone of every dispatch.

discord.js: Events.Raw (raw), which hands the undecoded packet.

Source

pub const ApplicationCommandPermissionsUpdate: ApplicationCommandPermissionsUpdate = ApplicationCommandPermissionsUpdate

An application command’s permissions were updated (APPLICATION_COMMAND_PERMISSIONS_UPDATE).

discord.js: Events.ApplicationCommandPermissionsUpdate.

Source

pub const AutoModerationActionExecution: AutoModerationActionExecution = AutoModerationActionExecution

An auto moderation rule acted on a message or member (AUTO_MODERATION_ACTION_EXECUTION). Intent: AUTO_MODERATION_EXECUTION.

discord.js: Events.AutoModerationActionExecution.

Source

pub const AutoModerationRuleCreate: AutoModerationRuleCreate = AutoModerationRuleCreate

An auto moderation rule was created (AUTO_MODERATION_RULE_CREATE). Intent: AUTO_MODERATION_CONFIGURATION.

discord.js: Events.AutoModerationRuleCreate.

Source

pub const AutoModerationRuleUpdate: AutoModerationRuleUpdate = AutoModerationRuleUpdate

An auto moderation rule was updated (AUTO_MODERATION_RULE_UPDATE). Intent: AUTO_MODERATION_CONFIGURATION.

The cache does not keep rules, so there is no old rule (C-091).

discord.js: Events.AutoModerationRuleUpdate.

Source

pub const AutoModerationRuleDelete: AutoModerationRuleDelete = AutoModerationRuleDelete

An auto moderation rule was deleted (AUTO_MODERATION_RULE_DELETE). Intent: AUTO_MODERATION_CONFIGURATION.

discord.js: Events.AutoModerationRuleDelete.

Source

pub const EntitlementCreate: EntitlementCreate = EntitlementCreate

A user subscribed to a SKU (ENTITLEMENT_CREATE).

discord.js: Events.EntitlementCreate.

Source

pub const EntitlementUpdate: EntitlementUpdate = EntitlementUpdate

An entitlement was updated, for example renewed (ENTITLEMENT_UPDATE).

discord.js: Events.EntitlementUpdate.

Source

pub const EntitlementDelete: EntitlementDelete = EntitlementDelete

An entitlement was deleted (ENTITLEMENT_DELETE).

discord.js: Events.EntitlementDelete.

Source

pub const SubscriptionCreate: SubscriptionCreate = SubscriptionCreate

A premium subscription was created (SUBSCRIPTION_CREATE).

discord.js: Events.SubscriptionCreate.

Source

pub const SubscriptionUpdate: SubscriptionUpdate = SubscriptionUpdate

A premium subscription was updated (SUBSCRIPTION_UPDATE).

discord.js: Events.SubscriptionUpdate.

Source

pub const SubscriptionDelete: SubscriptionDelete = SubscriptionDelete

A premium subscription was deleted (SUBSCRIPTION_DELETE).

discord.js: Events.SubscriptionDelete.

Source

pub const ChannelCreate: ChannelCreate = ChannelCreate

A guild channel was created (CHANNEL_CREATE). Intent: GUILDS.

discord.js: Events.ChannelCreate.

Source

pub const ChannelUpdate: ChannelUpdate = ChannelUpdate

A channel was updated (CHANNEL_UPDATE), with the cached channel before the update. Intent: GUILDS.

discord.js: Events.ChannelUpdate (oldChannel, newChannel).

Source

pub const ChannelDelete: ChannelDelete = ChannelDelete

A channel was deleted (CHANNEL_DELETE), with the cached channel. Intent: GUILDS.

discord.js: Events.ChannelDelete.

Source

pub const ChannelPinsUpdate: ChannelPinsUpdate = ChannelPinsUpdate

A message was pinned or unpinned (CHANNEL_PINS_UPDATE). Intents: GUILDS, DIRECT_MESSAGES.

discord.js: Events.ChannelPinsUpdate.

Source

pub const ChannelInfo: ChannelInfo = ChannelInfo

The ephemeral data of a guild’s channels (CHANNEL_INFO), the answer to a RequestChannelInfo command.

discord.js has no such event (C-091).

Source

pub const ThreadCreate: ThreadCreate = ThreadCreate

A thread was created, or the bot was added to one (THREAD_CREATE). Intent: GUILDS.

discord.js: Events.ThreadCreate (newly_created is a field of the payload).

Source

pub const ThreadUpdate: ThreadUpdate = ThreadUpdate

A thread was updated (THREAD_UPDATE), with the cached thread before the update. Intent: GUILDS.

discord.js: Events.ThreadUpdate (oldThread, newThread).

Source

pub const ThreadDelete: ThreadDelete = ThreadDelete

A thread was deleted (THREAD_DELETE), with the cached thread. Intent: GUILDS.

discord.js: Events.ThreadDelete.

Source

pub const ThreadListSync: ThreadListSync = ThreadListSync

The bot gained access to channels: their active threads (THREAD_LIST_SYNC). Intent: GUILDS.

discord.js: Events.ThreadListSync.

Source

pub const ThreadMemberUpdate: ThreadMemberUpdate = ThreadMemberUpdate

The bot’s own thread member was updated (THREAD_MEMBER_UPDATE). Intent: GUILDS.

The cache does not keep the bot’s thread member, so there is no old one (C-091).

discord.js: Events.ThreadMemberUpdate.

Source

pub const ThreadMembersUpdate: ThreadMembersUpdate = ThreadMembersUpdate

Members were added to or removed from a thread (THREAD_MEMBERS_UPDATE). Intents: GUILDS, and GUILD_MEMBERS for other users than the bot.

discord.js: Events.ThreadMembersUpdate.

Source

pub const GuildCreate: GuildCreate = GuildCreate

The bot joined a guild (GUILD_CREATE of a guild it was not waiting for). Intent: GUILDS.

Guilds from READY, and guilds back from an outage, are GuildAvailable instead (D-223).

discord.js: Events.GuildCreate.

Source

pub const GuildAvailable: GuildAvailable = GuildAvailable

A guild became available (GUILD_CREATE of a guild from READY or back from an outage). Intent: GUILDS.

discord.js: Events.GuildAvailable.

Source

pub const GuildUpdate: GuildUpdate = GuildUpdate

A guild was updated (GUILD_UPDATE), with the cached guild before the update. Intent: GUILDS.

discord.js: Events.GuildUpdate (oldGuild, newGuild).

Source

pub const GuildDelete: GuildDelete = GuildDelete

The bot left a guild, was removed, or the guild was deleted (GUILD_DELETE without unavailable), with the cached guild. Intent: GUILDS.

discord.js: Events.GuildDelete.

Source

pub const GuildUnavailable: GuildUnavailable = GuildUnavailable

A guild became unavailable because of an outage (GUILD_DELETE with unavailable), with the cached guild; GuildAvailable follows when it is back. Intent: GUILDS.

discord.js: Events.GuildUnavailable.

Source

pub const GuildAuditLogEntryCreate: GuildAuditLogEntryCreate = GuildAuditLogEntryCreate

An audit log entry was created (GUILD_AUDIT_LOG_ENTRY_CREATE). Intent: GUILD_MODERATION, and the bot needs the VIEW_AUDIT_LOG permission.

discord.js: Events.GuildAuditLogEntryCreate.

Source

pub const GuildBanAdd: GuildBanAdd = GuildBanAdd

A user was banned (GUILD_BAN_ADD). Intent: GUILD_MODERATION.

discord.js: Events.GuildBanAdd.

Source

pub const GuildBanRemove: GuildBanRemove = GuildBanRemove

A user was unbanned (GUILD_BAN_REMOVE). Intent: GUILD_MODERATION.

discord.js: Events.GuildBanRemove.

Source

pub const GuildEmojisUpdate: GuildEmojisUpdate = GuildEmojisUpdate

A guild’s emojis changed (GUILD_EMOJIS_UPDATE): the full new list. Intent: GUILD_EXPRESSIONS.

With emojis in the cache, GuildEmojiCreate, GuildEmojiUpdate and GuildEmojiDelete follow for each change (D-223).

discord.js has no such event; it only emits the per-emoji ones (C-091).

Source

pub const GuildEmojiCreate: GuildEmojiCreate = GuildEmojiCreate

An emoji was created, derived from GuildEmojisUpdate with emojis in the cache.

discord.js: Events.GuildEmojiCreate (emojiCreate).

Source

pub const GuildEmojiUpdate: GuildEmojiUpdate = GuildEmojiUpdate

An emoji was updated, derived from GuildEmojisUpdate with emojis in the cache.

discord.js: Events.GuildEmojiUpdate (emojiUpdate).

Source

pub const GuildEmojiDelete: GuildEmojiDelete = GuildEmojiDelete

An emoji was deleted, derived from GuildEmojisUpdate with emojis in the cache.

discord.js: Events.GuildEmojiDelete (emojiDelete).

Source

pub const GuildStickersUpdate: GuildStickersUpdate = GuildStickersUpdate

A guild’s stickers changed (GUILD_STICKERS_UPDATE): the full new list. Intent: GUILD_EXPRESSIONS.

With stickers in the cache, GuildStickerCreate, GuildStickerUpdate and GuildStickerDelete follow for each change (D-223).

discord.js has no such event; it only emits the per-sticker ones (C-091).

Source

pub const GuildStickerCreate: GuildStickerCreate = GuildStickerCreate

A sticker was created, derived from GuildStickersUpdate with stickers in the cache.

discord.js: Events.GuildStickerCreate (stickerCreate).

Source

pub const GuildStickerUpdate: GuildStickerUpdate = GuildStickerUpdate

A sticker was updated, derived from GuildStickersUpdate with stickers in the cache.

discord.js: Events.GuildStickerUpdate (stickerUpdate).

Source

pub const GuildStickerDelete: GuildStickerDelete = GuildStickerDelete

A sticker was deleted, derived from GuildStickersUpdate with stickers in the cache.

discord.js: Events.GuildStickerDelete (stickerDelete).

Source

pub const GuildIntegrationsUpdate: GuildIntegrationsUpdate = GuildIntegrationsUpdate

A guild’s integrations changed (GUILD_INTEGRATIONS_UPDATE). Intent: GUILD_INTEGRATIONS.

discord.js: Events.GuildIntegrationsUpdate.

Source

pub const IntegrationCreate: IntegrationCreate = IntegrationCreate

An integration was created (INTEGRATION_CREATE). Intent: GUILD_INTEGRATIONS.

discord.js has no such event (C-091).

Source

pub const IntegrationUpdate: IntegrationUpdate = IntegrationUpdate

An integration was updated (INTEGRATION_UPDATE). Intent: GUILD_INTEGRATIONS.

discord.js has no such event (C-091).

Source

pub const IntegrationDelete: IntegrationDelete = IntegrationDelete

An integration was deleted (INTEGRATION_DELETE). Intent: GUILD_INTEGRATIONS.

discord.js has no such event (C-091).

Source

pub const GuildMemberAdd: GuildMemberAdd = GuildMemberAdd

A user joined a guild (GUILD_MEMBER_ADD). Intent: GUILD_MEMBERS (privileged).

discord.js: Events.GuildMemberAdd.

Source

pub const GuildMemberUpdate: GuildMemberUpdate = GuildMemberUpdate

A member was updated (GUILD_MEMBER_UPDATE), with the cached member before the update. Intent: GUILD_MEMBERS (privileged).

discord.js: Events.GuildMemberUpdate (oldMember, newMember).

Source

pub const GuildMemberRemove: GuildMemberRemove = GuildMemberRemove

A user left or was removed from a guild (GUILD_MEMBER_REMOVE), with the cached member. Intent: GUILD_MEMBERS (privileged).

discord.js: Events.GuildMemberRemove.

Source

pub const GuildMembersChunk: GuildMembersChunk = GuildMembersChunk

A chunk of a guild’s members (GUILD_MEMBERS_CHUNK), the answer to a RequestGuildMembers command.

discord.js: Events.GuildMembersChunk.

Source

pub const GuildRoleCreate: GuildRoleCreate = GuildRoleCreate

A role was created (GUILD_ROLE_CREATE). Intent: GUILDS.

discord.js: Events.GuildRoleCreate (roleCreate).

Source

pub const GuildRoleUpdate: GuildRoleUpdate = GuildRoleUpdate

A role was updated (GUILD_ROLE_UPDATE), with the cached role before the update. Intent: GUILDS.

discord.js: Events.GuildRoleUpdate (roleUpdate; oldRole, newRole).

Source

pub const GuildRoleDelete: GuildRoleDelete = GuildRoleDelete

A role was deleted (GUILD_ROLE_DELETE), with the cached role. Intent: GUILDS.

discord.js: Events.GuildRoleDelete (roleDelete).

Source

pub const GuildScheduledEventCreate: GuildScheduledEventCreate = GuildScheduledEventCreate

A scheduled event was created (GUILD_SCHEDULED_EVENT_CREATE). Intent: GUILD_SCHEDULED_EVENTS.

discord.js: Events.GuildScheduledEventCreate.

Source

pub const GuildScheduledEventUpdate: GuildScheduledEventUpdate = GuildScheduledEventUpdate

A scheduled event was updated (GUILD_SCHEDULED_EVENT_UPDATE), with the cached event before the update. Intent: GUILD_SCHEDULED_EVENTS.

discord.js: Events.GuildScheduledEventUpdate.

Source

pub const GuildScheduledEventDelete: GuildScheduledEventDelete = GuildScheduledEventDelete

A scheduled event was deleted (GUILD_SCHEDULED_EVENT_DELETE), with the cached event. Intent: GUILD_SCHEDULED_EVENTS.

discord.js: Events.GuildScheduledEventDelete.

Source

pub const GuildScheduledEventUserAdd: GuildScheduledEventUserAdd = GuildScheduledEventUserAdd

A user subscribed to a scheduled event (GUILD_SCHEDULED_EVENT_USER_ADD). Intent: GUILD_SCHEDULED_EVENTS.

discord.js: Events.GuildScheduledEventUserAdd.

Source

pub const GuildScheduledEventUserRemove: GuildScheduledEventUserRemove = GuildScheduledEventUserRemove

A user unsubscribed from a scheduled event (GUILD_SCHEDULED_EVENT_USER_REMOVE). Intent: GUILD_SCHEDULED_EVENTS.

discord.js: Events.GuildScheduledEventUserRemove.

Source

pub const GuildSoundboardSoundCreate: GuildSoundboardSoundCreate = GuildSoundboardSoundCreate

A soundboard sound was created (GUILD_SOUNDBOARD_SOUND_CREATE). Intent: GUILD_EXPRESSIONS.

discord.js: Events.GuildSoundboardSoundCreate.

Source

pub const GuildSoundboardSoundUpdate: GuildSoundboardSoundUpdate = GuildSoundboardSoundUpdate

A soundboard sound was updated (GUILD_SOUNDBOARD_SOUND_UPDATE), with the cached sound before the update. Intent: GUILD_EXPRESSIONS.

discord.js: Events.GuildSoundboardSoundUpdate.

Source

pub const GuildSoundboardSoundDelete: GuildSoundboardSoundDelete = GuildSoundboardSoundDelete

A soundboard sound was deleted (GUILD_SOUNDBOARD_SOUND_DELETE), with the cached sound. Intent: GUILD_EXPRESSIONS.

discord.js: Events.GuildSoundboardSoundDelete.

Source

pub const GuildSoundboardSoundsUpdate: GuildSoundboardSoundsUpdate = GuildSoundboardSoundsUpdate

Several soundboard sounds were updated at once (GUILD_SOUNDBOARD_SOUNDS_UPDATE). Intent: GUILD_EXPRESSIONS.

discord.js: Events.GuildSoundboardSoundsUpdate.

Source

pub const SoundboardSounds: SoundboardSounds = SoundboardSounds

A guild’s soundboard sounds (SOUNDBOARD_SOUNDS), the answer to a RequestSoundboardSounds command.

discord.js: Events.SoundboardSounds.

Source

pub const StageInstanceCreate: StageInstanceCreate = StageInstanceCreate

A stage instance was created (STAGE_INSTANCE_CREATE). Intent: GUILDS.

discord.js: Events.StageInstanceCreate.

Source

pub const StageInstanceUpdate: StageInstanceUpdate = StageInstanceUpdate

A stage instance was updated (STAGE_INSTANCE_UPDATE), with the cached instance before the update. Intent: GUILDS.

discord.js: Events.StageInstanceUpdate.

Source

pub const StageInstanceDelete: StageInstanceDelete = StageInstanceDelete

A stage instance was deleted (STAGE_INSTANCE_DELETE), with the cached instance. Intent: GUILDS.

discord.js: Events.StageInstanceDelete.

Source

pub const InteractionCreate: InteractionCreate = InteractionCreate

A user used a command, a component or a modal (INTERACTION_CREATE).

discord.js: Events.InteractionCreate.

Source

pub const InviteCreate: InviteCreate = InviteCreate

An invite was created (INVITE_CREATE). Intent: GUILD_INVITES.

discord.js: Events.InviteCreate.

Source

pub const InviteDelete: InviteDelete = InviteDelete

An invite was deleted (INVITE_DELETE). Intent: GUILD_INVITES.

discord.js: Events.InviteDelete.

Source

pub const MessageCreate: MessageCreate = MessageCreate

A message was sent (MESSAGE_CREATE). Intents: GUILD_MESSAGES, DIRECT_MESSAGES.

Guild message content needs the privileged MESSAGE_CONTENT intent.

discord.js: Events.MessageCreate.

Source

pub const MessageUpdate: MessageUpdate = MessageUpdate

A message was edited (MESSAGE_UPDATE), with the cached message before the edit. Intents: GUILD_MESSAGES, DIRECT_MESSAGES.

discord.js: Events.MessageUpdate (oldMessage, newMessage).

Source

pub const MessageDelete: MessageDelete = MessageDelete

A message was deleted (MESSAGE_DELETE), with the cached message. Intents: GUILD_MESSAGES, DIRECT_MESSAGES.

discord.js: Events.MessageDelete.

Source

pub const MessageBulkDelete: MessageBulkDelete = MessageBulkDelete

Messages were deleted at once (MESSAGE_DELETE_BULK), with the cached ones. Intent: GUILD_MESSAGES.

discord.js: Events.MessageBulkDelete (messageDeleteBulk).

Source

pub const MessageReactionAdd: MessageReactionAdd = MessageReactionAdd

A reaction was added (MESSAGE_REACTION_ADD). Intents: GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.

discord.js: Events.MessageReactionAdd.

Source

pub const MessageReactionRemove: MessageReactionRemove = MessageReactionRemove

A reaction was removed (MESSAGE_REACTION_REMOVE). Intents: GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.

discord.js: Events.MessageReactionRemove.

Source

pub const MessageReactionRemoveAll: MessageReactionRemoveAll = MessageReactionRemoveAll

All reactions were removed from a message (MESSAGE_REACTION_REMOVE_ALL). Intents: GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.

discord.js: Events.MessageReactionRemoveAll.

Source

pub const MessageReactionRemoveEmoji: MessageReactionRemoveEmoji = MessageReactionRemoveEmoji

All reactions with one emoji were removed (MESSAGE_REACTION_REMOVE_EMOJI). Intents: GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.

discord.js: Events.MessageReactionRemoveEmoji.

Source

pub const MessagePollVoteAdd: MessagePollVoteAdd = MessagePollVoteAdd

A user voted in a poll (MESSAGE_POLL_VOTE_ADD). Intents: GUILD_MESSAGE_POLLS, DIRECT_MESSAGE_POLLS.

discord.js: Events.MessagePollVoteAdd.

Source

pub const MessagePollVoteRemove: MessagePollVoteRemove = MessagePollVoteRemove

A user removed a poll vote (MESSAGE_POLL_VOTE_REMOVE). Intents: GUILD_MESSAGE_POLLS, DIRECT_MESSAGE_POLLS.

discord.js: Events.MessagePollVoteRemove.

Source

pub const TypingStart: TypingStart = TypingStart

A user started typing (TYPING_START). Intents: GUILD_MESSAGE_TYPING, DIRECT_MESSAGE_TYPING.

discord.js: Events.TypingStart.

Source

pub const PresenceUpdate: PresenceUpdate = PresenceUpdate

A user’s presence changed (PRESENCE_UPDATE), with the cached presence before the change. Intent: GUILD_PRESENCES (privileged).

discord.js: Events.PresenceUpdate (oldPresence, newPresence).

Source

pub const UserUpdate: UserUpdate = UserUpdate

The bot’s user was updated (USER_UPDATE), with the cached user before the update.

discord.js: Events.UserUpdate (oldUser, newUser).

Source

pub const VoiceStateUpdate: VoiceStateUpdate = VoiceStateUpdate

A user joined, left or moved between voice channels, or changed their voice state (VOICE_STATE_UPDATE), with the cached state before the change. Intent: GUILD_VOICE_STATES.

discord.js: Events.VoiceStateUpdate (oldState, newState).

Source

pub const VoiceServerUpdate: VoiceServerUpdate = VoiceServerUpdate

The voice server of a guild the bot is connecting to (VOICE_SERVER_UPDATE).

discord.js: Events.VoiceServerUpdate.

Source

pub const VoiceChannelEffectSend: VoiceChannelEffectSend = VoiceChannelEffectSend

A user sent an effect, such as an emoji, in a voice channel (VOICE_CHANNEL_EFFECT_SEND). Intent: GUILD_VOICE_STATES.

discord.js: Events.VoiceChannelEffectSend.

Source

pub const VoiceChannelStatusUpdate: VoiceChannelStatusUpdate = VoiceChannelStatusUpdate

A voice channel’s status was set or cleared (VOICE_CHANNEL_STATUS_UPDATE). Intent: GUILDS.

discord.js has no such event (C-091).

Source

pub const VoiceChannelStartTimeUpdate: VoiceChannelStartTimeUpdate = VoiceChannelStartTimeUpdate

A voice channel’s start time changed (VOICE_CHANNEL_START_TIME_UPDATE). Intent: GUILDS.

discord.js has no such event (C-091).

Source

pub const WebhooksUpdate: WebhooksUpdate = WebhooksUpdate

A channel’s webhooks changed (WEBHOOKS_UPDATE). Intent: GUILD_WEBHOOKS.

discord.js: Events.WebhooksUpdate.

Source

pub const RateLimited: RateLimited = RateLimited

A gateway command sent by the bot was rate limited (RATE_LIMITED), for example a RequestGuildMembers.

discord.js has no such event (C-091).

Trait Implementations§

Source§

impl Clone for Events

Source§

fn clone(&self) -> Self

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 Copy for Events

Source§

impl Debug for Events

Source§

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

Formats the value using the given formatter. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Classify for T

§

type Classified = T

§

fn classify(self) -> T

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
§

impl<T> Declassify for T

§

type Declassified = T

§

fn declassify(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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