aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-08 19:57:08 -0800
committerAustin Hellyer <[email protected]>2017-01-08 19:57:08 -0800
commite85e901062e8b9ea717ec6c6253c9c7a300448d3 (patch)
tree0c1dea105cf99c06699d8cea8c8999a77ed7d26d /src/utils
parentSimplify Reaction::delete() (diff)
downloadserenity-e85e901062e8b9ea717ec6c6253c9c7a300448d3.tar.xz
serenity-e85e901062e8b9ea717ec6c6253c9c7a300448d3.zip
Add User::default_avatar_url() method
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/macros.rs10
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)