aboutsummaryrefslogtreecommitdiff
path: root/src/model/invite.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-22 07:57:51 -0800
committerAustin Hellyer <[email protected]>2016-11-22 07:57:51 -0800
commitd4726f899cf6b86d805a8a2a77ec57782ec3bdd6 (patch)
tree7966be3c6d6c4284bb618b88b3f146dd412af677 /src/model/invite.rs
parentDon't typo CreateEmbed::image field (diff)
downloadserenity-d4726f899cf6b86d805a8a2a77ec57782ec3bdd6.tar.xz
serenity-d4726f899cf6b86d805a8a2a77ec57782ec3bdd6.zip
Rename the State to Cache
Diffstat (limited to 'src/model/invite.rs')
-rw-r--r--src/model/invite.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/invite.rs b/src/model/invite.rs
index 58773d1..6552783 100644
--- a/src/model/invite.rs
+++ b/src/model/invite.rs
@@ -3,8 +3,8 @@ use ::client::http;
use ::internal::prelude::*;
use super::{permissions, utils};
-#[cfg(feature = "state")]
-use ::client::STATE;
+#[cfg(feature = "cache")]
+use ::client::CACHE;
impl Invite {
/// Accepts the invite, placing the current user in the [`Guild`] that the
@@ -19,7 +19,7 @@ impl Invite {
///
/// # Errors
///
- /// If the `state` features is enabled, then this returns a
+ /// If the `cache` features is enabled, then this returns a
/// [`ClientError::InvalidOperationAsBot`] if the current user does not have
/// the required [permission].
///
@@ -29,8 +29,8 @@ impl Invite {
/// [permission]: permissions/index.html
#[cfg(feature="methods")]
pub fn accept(&self) -> Result<Invite> {
- feature_state_enabled! {{
- if STATE.lock().unwrap().user.bot {
+ feature_cache_enabled! {{
+ if CACHE.lock().unwrap().user.bot {
return Err(Error::Client(ClientError::InvalidOperationAsBot));
}
}}
@@ -83,8 +83,8 @@ impl RichInvite {
/// [`http::accept_invite`]: ../client/http/fn.accept_invite.html
#[cfg(feature="methods")]
pub fn accept(&self) -> Result<Invite> {
- feature_state_enabled! {{
- if STATE.lock().unwrap().user.bot {
+ feature_cache_enabled! {{
+ if CACHE.lock().unwrap().user.bot {
return Err(Error::Client(ClientError::InvalidOperationAsBot));
}
}}
@@ -100,7 +100,7 @@ impl RichInvite {
///
/// # Errors
///
- /// If the `state` feature is enabled, then this returns a
+ /// If the `cache` feature is enabled, then this returns a
/// [`ClientError::InvalidPermissions`] if the current user does not have
/// the required [permission].
///