diff options
| author | Lakelezz <[email protected]> | 2018-03-15 23:03:56 +0100 |
|---|---|---|
| committer | alex <[email protected]> | 2018-03-15 23:03:56 +0100 |
| commit | 02dc5064d9402f73ef514c9b8ffa318f5d4235ff (patch) | |
| tree | 696b9746abfb532d689ccaadfecea2aefe53d7c9 /src/framework/standard/help_commands.rs | |
| parent | Add a basic CONTRIBUTING.md (diff) | |
| download | serenity-02dc5064d9402f73ef514c9b8ffa318f5d4235ff.tar.xz serenity-02dc5064d9402f73ef514c9b8ffa318f5d4235ff.zip | |
Fix no-cache standardframework compilation (#290)
Diffstat (limited to 'src/framework/standard/help_commands.rs')
| -rw-r--r-- | src/framework/standard/help_commands.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index d740086..0a76636 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -24,6 +24,7 @@ //! [`with_embeds`]: fn.with_embeds.html use client::Context; +#[cfg(feature = "cache")] use framework::standard::{has_correct_roles, has_correct_permissions}; use model::channel::Message; use model::id::ChannelId; @@ -55,6 +56,7 @@ fn remove_aliases(cmds: &HashMap<String, CommandOrAlias>) -> HashMap<&String, &I /// Checks whether a user is member of required roles /// and given the required permissions. +#[cfg(feature = "cache")] pub fn has_all_requirements(cmd: &Arc<CommandOptions>, msg: &Message) -> bool { if let Some(guild) = msg.guild() { let guild = guild.read(); @@ -92,6 +94,7 @@ pub fn has_all_requirements(cmd: &Arc<CommandOptions>, msg: &Message) -> bool { /// client.with_framework(StandardFramework::new() /// .help(help_commands::with_embeds)); /// ``` +#[cfg(feature = "cache")] pub fn with_embeds<H: BuildHasher>( _: &mut Context, msg: &Message, @@ -335,6 +338,7 @@ pub fn with_embeds<H: BuildHasher>( /// client.with_framework(StandardFramework::new() /// .help(help_commands::plain)); /// ``` +#[cfg(feature = "cache")] pub fn plain<H: BuildHasher>( _: &mut Context, msg: &Message, |