diff options
| author | Austin Hellyer <[email protected]> | 2016-11-05 16:10:38 -0700 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-05 16:10:38 -0700 |
| commit | 21e68f684166ed4693f0e2eb6530d047898c98b7 (patch) | |
| tree | dcc4763307162a72db36176aca8481d2fad6edcd /src/utils | |
| parent | Add missing voice region fields + add docs (diff) | |
| download | serenity-21e68f684166ed4693f0e2eb6530d047898c98b7.tar.xz serenity-21e68f684166ed4693f0e2eb6530d047898c98b7.zip | |
Support major parameters in ratelimits
Refer to the documentation for `serenity::client::ratelimiting::Route`
on how major parameters work.
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs index a2dbf6f..294d7a7 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -54,24 +54,24 @@ pub fn into_array(value: Value) -> Result<Vec<Value>> { } macro_rules! request { - ($route:path, $method:ident($body:expr), $url:expr, $($rest:tt)*) => {{ + ($route:expr, $method:ident($body:expr), $url:expr, $($rest:tt)*) => {{ let client = HyperClient::new(); try!(request($route, || client .$method(&format!(api!($url), $($rest)*)) .body(&$body))) }}; - ($route:path, $method:ident($body:expr), $url:expr) => {{ + ($route:expr, $method:ident($body:expr), $url:expr) => {{ let client = HyperClient::new(); try!(request($route, || client .$method(api!($url)) .body(&$body))) }}; - ($route:path, $method:ident, $url:expr, $($rest:tt)*) => {{ + ($route:expr, $method:ident, $url:expr, $($rest:tt)*) => {{ let client = HyperClient::new(); try!(request($route, || client .$method(&format!(api!($url), $($rest)*)))) }}; - ($route:path, $method:ident, $url:expr) => {{ + ($route:expr, $method:ident, $url:expr) => {{ let client = HyperClient::new(); try!(request($route, || client .$method(api_concat!($url)))) |