Struct serenity::model::Invite
[−]
[src]
pub struct Invite { pub code: String, pub channel: InviteChannel, pub guild: InviteGuild, }
Information about an invite.
Fields
code: String
The unique code for the invite.
channel: InviteChannel
A representation of the minimal amount of information needed about the GuildChannel
being invited to.
guild: InviteGuild
A representation of the minimal amount of information needed about the Guild
being invited to.
Methods
impl Invite
[src]
fn accept(&self) -> Result<Invite>
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.
fn delete(&self) -> Result<Invite>
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]
fn clone(&self) -> Invite
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more