diff options
| author | Austin Hellyer <[email protected]> | 2017-01-08 19:57:08 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-08 19:57:08 -0800 |
| commit | e85e901062e8b9ea717ec6c6253c9c7a300448d3 (patch) | |
| tree | 0c1dea105cf99c06699d8cea8c8999a77ed7d26d /src/utils | |
| parent | Simplify Reaction::delete() (diff) | |
| download | serenity-e85e901062e8b9ea717ec6c6253c9c7a300448d3.tar.xz serenity-e85e901062e8b9ea717ec6c6253c9c7a300448d3.zip | |
Add User::default_avatar_url() method
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/macros.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/macros.rs b/src/utils/macros.rs index 51e016d..3032dc3 100644 --- a/src/utils/macros.rs +++ b/src/utils/macros.rs @@ -28,6 +28,16 @@ macro_rules! cdn { concat!("https://cdn.discordapp.com", $e) } } + +macro_rules! base { + ($e:expr) => { + concat!("https://discordapp.com", $e) + }; + ($e:expr, $($rest:tt)*) => { + format!(base!($e), $($rest)*) + }; +} + macro_rules! api { ($e:expr) => { concat!("https://discordapp.com/api/v6", $e) |