diff options
| author | Austin Hellyer <[email protected]> | 2016-11-15 11:36:53 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-15 11:36:53 -0800 |
| commit | 5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4 (patch) | |
| tree | 7cf531e4790109d6d7edd26bc5b483378d5ba5ac /src/model/invite.rs | |
| parent | Embed Author: everything but 'name' is optional (diff) | |
| download | serenity-5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4.tar.xz serenity-5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4.zip | |
Add state/framework/etc. conditional compile flags
This adds conditional compilation for the following features, in
addition to the voice conditional compilation flag:
- extras (message builder)
- framework
- methods
- state
These 4 are enabled _by default_, while the `voice` feature flag is
disabled.
Disabling the state will allow incredibly low-memory bots.
Diffstat (limited to 'src/model/invite.rs')
| -rw-r--r-- | src/model/invite.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/model/invite.rs b/src/model/invite.rs index 8fd55e7..c33647e 100644 --- a/src/model/invite.rs +++ b/src/model/invite.rs @@ -10,6 +10,7 @@ impl Invite { /// banned. A ban is equivilant to an IP ban. /// /// [`Guild`]: struct.Guild.html + #[cfg(feature="methods")] pub fn accept(&self) -> Result<Invite> { http::accept_invite(&self.code) } @@ -25,6 +26,7 @@ impl Invite { /// /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Manage Guild]: permissions/constant.MANAGE_GUILD.html + #[cfg(feature="methods")] pub fn delete(&self) -> Result<Invite> { let req = permissions::MANAGE_GUILD; @@ -43,6 +45,7 @@ impl RichInvite { /// accepting an invite. /// /// [`Invite::accept`]: struct.Invite.html#method.accept + #[cfg(feature="methods")] pub fn accept(&self) -> Result<Invite> { http::accept_invite(&self.code) } @@ -60,6 +63,7 @@ impl RichInvite { /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`Invite::delete`]: struct.Invite.html#method.delete /// [Manage Guild]: permissions/constant.MANAGE_GUILD.html + #[cfg(feature="methods")] pub fn delete(&self) -> Result<Invite> { let req = permissions::MANAGE_GUILD; |