aboutsummaryrefslogtreecommitdiff
path: root/src/model/permissions.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-15 11:36:53 -0800
committerAustin Hellyer <[email protected]>2016-11-15 11:36:53 -0800
commit5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4 (patch)
tree7cf531e4790109d6d7edd26bc5b483378d5ba5ac /src/model/permissions.rs
parentEmbed Author: everything but 'name' is optional (diff)
downloadserenity-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/permissions.rs')
-rw-r--r--src/model/permissions.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/model/permissions.rs b/src/model/permissions.rs
index 49a5069..c21e441 100644
--- a/src/model/permissions.rs
+++ b/src/model/permissions.rs
@@ -82,6 +82,7 @@ use ::internal::prelude::*;
/// [Speak]: constant.SPEAK.html
/// [Use External Emojis]: constant.USE_EXTERNAL_EMOJIS.html
/// [Use VAD]: constant.USE_VAD.html
+#[cfg(feature="extras")]
pub fn general() -> Permissions {
use self::*;
@@ -119,6 +120,7 @@ pub fn general() -> Permissions {
/// [Send Messages]: constant.SEND_MESSAGES.html
/// [Send TTS Messages]: constant.SEND_TTS_MESSAGES.html
/// [Use External Emojis]: constant.USE_EXTERNAL_EMOJIS.html
+#[cfg(feature="extras")]
pub fn text() -> Permissions {
use self::*;
@@ -140,6 +142,7 @@ pub fn text() -> Permissions {
/// [Connect]: constant.CONNECT.html
/// [Speak]: constant.SPEAK.html
/// [Use VAD]: constant.USE_VAD.html
+#[cfg(feature="extras")]
pub fn voice() -> Permissions {
use self::*;