aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2018-05-01 16:21:17 +0200
committeracdenisSK <[email protected]>2018-05-01 16:21:17 +0200
commita481df6e67d83216617a40d07991ba8ea04d0075 (patch)
tree08dabae00c127a643cb28db643da99dfa114381a /src/framework
parentUpdate join messages constant (diff)
downloadserenity-a481df6e67d83216617a40d07991ba8ea04d0075.tar.xz
serenity-a481df6e67d83216617a40d07991ba8ea04d0075.zip
Reword the command macro doc to be less misleading
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/mod.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs
index fdb9ca4..e3e6395 100644
--- a/src/framework/standard/mod.rs
+++ b/src/framework/standard/mod.rs
@@ -52,17 +52,19 @@ use client::CACHE;
#[cfg(feature = "cache")]
use model::channel::Channel;
-/// A macro to generate "named parameters". This is useful to avoid manually
-/// using the "arguments" parameter and manually parsing types.
+/// A convenience macro for generating a struct fulfilling the [`Command`] trait.
///
-/// This is meant for use with the command [`Framework`].
+/// This is meant for use with the [`Framework`], specifically `Framework`::{[`cmd`]/[`command`]}.
+///
+///
+/// If you're just looking for a simple "register this function as a command", use [`Framework::on`].
///
/// # Examples
///
/// Create a regular `ping` command which takes no arguments:
///
/// ```rust,ignore
-/// command!(ping(_context, message, _args) {
+/// command!(ping(_context, message) {
/// if let Err(why) = message.reply("Pong!") {
/// println!("Error sending pong: {:?}", why);
/// }
@@ -85,6 +87,10 @@ use model::channel::Channel;
/// ```
///
/// [`Framework`]: framework/index.html
+/// [`cmd`]: struct.Framework.html#method.cmd
+/// [`command`]: struct.Framework.html#method.command
+/// [`Framework::on`]: struct.Framework.html#method.on
+/// [`Command`]: trait.Command.html
#[macro_export]
macro_rules! command {
($fname:ident($c:ident) $b:block) => {