Struct serenity::model::Invite [] [src]

pub struct Invite {
    pub code: String,
    pub channel: InviteChannel,
    pub guild: InviteGuild,
}

Information about an invite.

Fields

The unique code for the invite.

A representation of the minimal amount of information needed about the GuildChannel being invited to.

A representation of the minimal amount of information needed about the Guild being invited to.

Methods

impl Invite
[src]

Accepts the invite, placing the current user in the Guild that the invite was for.

Refer to rest::accept_invite for more information.

Note: This will fail if you are already in the guild, or are banned. A ban is equivilant to an IP ban.

Note: Requires that the current user be a user account.

Errors

If the cache features is enabled, then this returns a ClientError::InvalidOperationAsBot if the current user does not have the required permission.

Deletes the invite.

Note: Requires the Manage Guild permission.

Errors

If the cache is enabled, returns a ClientError::InvalidPermissions if the current user does not have the required permission.

Trait Implementations

impl Clone for Invite
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Invite
[src]

Formats the value using the given formatter.