diff options
Diffstat (limited to 'src/ext/framework')
| -rw-r--r-- | src/ext/framework/configuration.rs | 14 | ||||
| -rw-r--r-- | src/ext/framework/create_command.rs | 4 | ||||
| -rw-r--r-- | src/ext/framework/mod.rs | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/ext/framework/configuration.rs b/src/ext/framework/configuration.rs index 611775a..5448a25 100644 --- a/src/ext/framework/configuration.rs +++ b/src/ext/framework/configuration.rs @@ -192,7 +192,7 @@ impl Configuration { /// Message that's sent if a command is disabled. /// - /// %command% will be replaced with command name. + /// `%command%` will be replaced with command name. pub fn command_disabled_message(mut self, content: &str) -> Self { self.command_disabled_message = Some(content.to_owned()); @@ -224,7 +224,7 @@ impl Configuration { /// Message that's sent when a command is on cooldown. /// See framework documentation to see where is this utilized. /// - /// %time% will be replaced with waiting time in seconds. + /// `%time%` will be replaced with waiting time in seconds. pub fn rate_limit_message(mut self, content: &str) -> Self { self.rate_limit_message = Some(content.to_owned()); @@ -247,9 +247,9 @@ impl Configuration { /// Message that's sent when user sends too few arguments to a command. /// - /// %min% will be replaced with minimum allowed amount of arguments. + /// `%min%` will be replaced with minimum allowed amount of arguments. /// - /// %given% will be replced with the given amount of arguments. + /// `%given%` will be replced with the given amount of arguments. pub fn not_enough_args_message(mut self, content: &str) -> Self { self.not_enough_args_message = Some(content.to_owned()); @@ -292,7 +292,7 @@ impl Configuration { self } - /// HashSet of user Ids checks won't apply to. + /// A `HashSet` of user Ids checks won't apply to. pub fn owners(mut self, user_ids: HashSet<UserId>) -> Self { self.owners = user_ids; @@ -317,9 +317,9 @@ impl Configuration { /// Message that's sent when user sends too many arguments to a command. /// - /// %max% will be replaced with maximum allowed amount of arguments. + /// `%max%` will be replaced with maximum allowed amount of arguments. /// - /// %given% will be replced with the given amount of arguments. + /// `%given%` will be replced with the given amount of arguments. pub fn too_many_args_message(mut self, content: &str) -> Self { self.too_many_args_message = Some(content.to_owned()); diff --git a/src/ext/framework/create_command.rs b/src/ext/framework/create_command.rs index 52a0793..357a597 100644 --- a/src/ext/framework/create_command.rs +++ b/src/ext/framework/create_command.rs @@ -94,7 +94,7 @@ impl CreateCommand { } /// A function that can be called when a command is received. - /// You can return Err(string) if there's an error. + /// You can return `Err(string)` if there's an error. /// /// See [`exec_str`] if you _only_ need to return a string on command use. /// @@ -110,7 +110,7 @@ impl CreateCommand { /// the internal HashMap of commands, used specifically for creating a help /// command. /// - /// You can return Err(string) if there's an error. + /// You can return `Err(string)` if there's an error. pub fn exec_help<F>(mut self, f: F) -> Self where F: Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, Vec<String>) -> Result<(), String> + Send + Sync + 'static { self.0.exec = CommandType::WithCommands(Box::new(f)); diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index 988d3a3..e2a4479 100644 --- a/src/ext/framework/mod.rs +++ b/src/ext/framework/mod.rs @@ -1,5 +1,6 @@ -//! The framework is a customizable method of separating commands, used in -//! combination with [`Client::with_framework`]. +//! The framework is a customizable method of separating commands. +//! +//! This is used in combination with [`Client::with_framework`]. //! //! The framework has a number of configurations, and can have any number of //! commands bound to it. The primary purpose of it is to offer the utility of |