aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-05 15:29:16 -0700
committerAustin Hellyer <[email protected]>2016-11-05 15:29:16 -0700
commit79390deb7f99fca3d300816cdb72d5647bc62252 (patch)
tree9b4255dbb15fbc6e42aa4d43668ecd87f699063f /src/client
parentAdd message reactions (diff)
downloadserenity-79390deb7f99fca3d300816cdb72d5647bc62252.tar.xz
serenity-79390deb7f99fca3d300816cdb72d5647bc62252.zip
Finalize invite-related documentation
Diffstat (limited to 'src/client')
-rw-r--r--src/client/context.rs21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index 2d3d3e4..ef314eb 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -38,6 +38,12 @@ impl Context {
}
}
+ /// Accepts the given invite.
+ ///
+ /// Refer to the documentation for [`Invite::accept`] for restrictions on
+ /// accepting an invite.
+ ///
+ /// [`Invite::accept`]: ../model/struct.Invite.html#method.accept
pub fn accept_invite(&self, invite: &str) -> Result<Invite> {
let code = utils::parse_invite(invite);
@@ -292,13 +298,24 @@ impl Context {
integration_id.into().0)
}
- /*
+ /// Deletes the given invite.
+ ///
+ /// Refer to the documentation for [`Invite::delete`] for restrictions on
+ /// deleting an invite.
+ ///
+ /// # Errors
+ ///
+ /// Returns a [`ClientError::InvalidPermissions`] if the current user does
+ /// not have the required [permission].
+ ///
+ /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions
+ /// [`Invite::delete`]: ../model/struct.Invite.html#method.delete
+ /// [Manage Guild]: permissions/constant.MANAGE_GUILD.html
pub fn delete_invite(&self, invite: &str) -> Result<Invite> {
let code = utils::parse_invite(invite);
http::delete_invite(code)
}
- */
/// Deletes a [Message](../model/struct.Message.html) given its ID.
///