aboutsummaryrefslogtreecommitdiff
path: root/src/framework/mod.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-18 00:56:29 +0200
committeracdenisSK <[email protected]>2017-08-18 00:56:29 +0200
commit428cbb94de239e87d3258891591e1464cb9d2e06 (patch)
tree60177e640e0c4266cc49386fce272145a54e4b26 /src/framework/mod.rs
parentAllow the user to be given the original message (as in, the message used to c... (diff)
downloadserenity-428cbb94de239e87d3258891591e1464cb9d2e06.tar.xz
serenity-428cbb94de239e87d3258891591e1464cb9d2e06.zip
Add a case for `context, message, args, full_message`
Diffstat (limited to 'src/framework/mod.rs')
-rw-r--r--src/framework/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/framework/mod.rs b/src/framework/mod.rs
index 03ee742..5c676ec 100644
--- a/src/framework/mod.rs
+++ b/src/framework/mod.rs
@@ -152,6 +152,14 @@ macro_rules! command {
Ok(())
}
};
+ ($fname:ident($c:ident, $m:ident, $a:ident, @$f:ident) $b:block) => {
+ #[allow(unreachable_code, unused_mut)]
+ pub fn $fname(mut $c: &mut $crate::client::Context, $m: &$crate::model::Message, $a: Vec<String>, $f: String) -> ::std::result::Result<(), String> {
+ $b
+
+ Ok(())
+ }
+ };
($fname:ident($c:ident, $m:ident, $a:ident, $($name:ident: $t:ty),*) $b:block) => {
#[allow(unreachable_code, unreachable_patterns, unused_mut)]
pub fn $fname(mut $c: &mut $crate::client::Context, $m: &$crate::model::Message, $a: Vec<String>, _: String) -> ::std::result::Result<(), String> {