#[non_exhaustive]pub struct InviteCreateEvent {
pub channel_id: ChannelId,
pub code: String,
pub created_at: Timestamp,
pub guild_id: Option<GuildId>,
pub inviter: Option<User>,
pub max_age: u32,
pub max_uses: u8,
pub target_type: Option<InviteTargetType>,
pub target_user: Option<User>,
pub target_application: Option<Value>,
pub temporary: bool,
pub uses: u64,
}
Expand description
Requires GatewayIntents::GUILD_INVITES
and [`Permissions::MANAGE_CHANNELS´] permission.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.channel_id: ChannelId
Whether or not the invite is temporary (invited users will be kicked on disconnect unless Channel the invite is for.
code: String
Unique invite code.
created_at: Timestamp
Time at which the invite was created.
guild_id: Option<GuildId>
Guild of the invite.
inviter: Option<User>
User that created the invite.
max_age: u32
How long the invite is valid for (in seconds).
max_uses: u8
Maximum number of times the invite can be used.
target_type: Option<InviteTargetType>
Type of target for this voice channel invite.
target_user: Option<User>
User whose stream to display for this voice channel stream invite.
target_application: Option<Value>
Embedded application to open for this voice channel embedded application invite.
temporary: bool
they’re assigned a role).
uses: u64
How many times the invite has been used (always will be 0).
Trait Implementations§
Source§impl Clone for InviteCreateEvent
impl Clone for InviteCreateEvent
Source§fn clone(&self) -> InviteCreateEvent
fn clone(&self) -> InviteCreateEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InviteCreateEvent
impl Debug for InviteCreateEvent
Source§impl<'de> Deserialize<'de> for InviteCreateEvent
impl<'de> Deserialize<'de> for InviteCreateEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InviteCreateEvent
impl RefUnwindSafe for InviteCreateEvent
impl Send for InviteCreateEvent
impl Sync for InviteCreateEvent
impl Unpin for InviteCreateEvent
impl UnwindSafe for InviteCreateEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more