Skip to content

Commit

Permalink
Add a case for context, message, args, full_message
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Aug 17, 2017
1 parent 106a4d5 commit 428cbb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 428cbb9

Please sign in to comment.