aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2018-03-25 19:25:01 +0200
committeracdenisSK <[email protected]>2018-03-25 19:25:17 +0200
commitc6a5fe4ef9dc07b9b14f742440a35ba6ea02058b (patch)
tree5da1e33e694454d711dcee5d8897c1c5c4b63c5d /src/framework
parentChange the way ids and some enums are made (#295) (diff)
downloadserenity-c6a5fe4ef9dc07b9b14f742440a35ba6ea02058b.tar.xz
serenity-c6a5fe4ef9dc07b9b14f742440a35ba6ea02058b.zip
Fix help precendence
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs
index 1eb1ad2..8db7a7d 100644
--- a/src/framework/standard/mod.rs
+++ b/src/framework/standard/mod.rs
@@ -910,6 +910,10 @@ impl StandardFramework {
}
/// Sets what code should be executed when a user sends `(prefix)help`.
+ ///
+ /// If a command named `help` was set with [`command`], then this takes precendence first.
+ ///
+ /// [`command`]: #method.command
pub fn help(mut self, f: HelpFunction) -> Self {
let a = CreateHelpCommand(HelpOptions::default(), f).finish();
@@ -1011,7 +1015,6 @@ impl Framework for StandardFramework {
let before = self.before.clone();
let after = self.after.clone();
- // This is a special case.
if to_check == "help" {
let help = self.help.clone();
@@ -1034,8 +1037,6 @@ impl Framework for StandardFramework {
});
return;
}
-
- return;
}
if let Some(&CommandOrAlias::Command(ref command)) =