#[non_exhaustive]pub struct InviteCreate {Show 14 fields
pub channel_id: ChannelId,
pub code: CompactString,
pub created_at: Timestamp,
pub guild_id: Option<GuildId>,
pub inviter: Option<Box<User>>,
pub max_age: u32,
pub max_uses: u32,
pub target_type: Option<InviteTargetType>,
pub target_user: Option<Box<User>>,
pub target_application: Option<Box<PartialApplication>>,
pub temporary: bool,
pub uses: u32,
pub expires_at: Option<Timestamp>,
pub role_ids: Vec<RoleId>,
}Expand description
The data of the Invite Create
dispatch event (requires MANAGE_CHANNELS on the channel).
discord.js counterpart: the InviteCreate event.
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: ChannelIdThe channel the invite is for.
code: CompactStringThe invite code.
created_at: TimestampWhen the invite was created.
guild_id: Option<GuildId>The invite’s guild.
inviter: Option<Box<User>>Who created the invite.
max_age: u32How long the invite is valid, in seconds (0 = forever).
max_uses: u32How often it can be used (0 = unlimited).
target_type: Option<InviteTargetType>What a voice channel invite targets.
target_user: Option<Box<User>>The user whose stream a stream invite shows.
target_application: Option<Box<PartialApplication>>The embedded application an application invite opens.
temporary: boolWhether users who join through it are kicked on disconnect unless given a role.
uses: u32How often it was used (always 0 here).
expires_at: Option<Timestamp>When the invite expires.
role_ids: Vec<RoleId>The roles given to users who accept the invite.
Trait Implementations§
Source§impl Clone for InviteCreate
impl Clone for InviteCreate
Source§impl Debug for InviteCreate
impl Debug for InviteCreate
Source§impl<'de> Deserialize<'de> for InviteCreate
impl<'de> Deserialize<'de> for InviteCreate
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
impl Eq for InviteCreate
Source§impl PartialEq for InviteCreate
impl PartialEq for InviteCreate
Source§impl Serialize for InviteCreate
impl Serialize for InviteCreate
impl StructuralPartialEq for InviteCreate
Auto Trait Implementations§
impl Freeze for InviteCreate
impl RefUnwindSafe for InviteCreate
impl Send for InviteCreate
impl Sync for InviteCreate
impl Unpin for InviteCreate
impl UnsafeUnpin for InviteCreate
impl UnwindSafe for InviteCreate
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