summaryrefslogtreecommitdiff
path: root/src/discord/webhook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord/webhook.cpp')
-rw-r--r--src/discord/webhook.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/discord/webhook.cpp b/src/discord/webhook.cpp
index 4e8b422..318f8c8 100644
--- a/src/discord/webhook.cpp
+++ b/src/discord/webhook.cpp
@@ -11,3 +11,7 @@ void from_json(const nlohmann::json &j, WebhookData &m) {
JS_O("token", m.Token);
JS_N("application_id", m.ApplicationID);
}
+
+std::string WebhookMessageData::GetAvatarURL() const {
+ return Avatar.empty() ? "" : "https://cdn.discordapp.com/avatars/" + std::to_string(WebhookID) + "/" + Avatar + ".png?size=32";
+}