aboutsummaryrefslogtreecommitdiffstats
path: root/backend/authentication
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-12-21 19:39:21 +0000
committerGravatar GitHub <[email protected]>2020-12-21 19:39:21 +0000
commit443a322b553ce38d3cde67798ee3b7c19aa9fbeb (patch)
tree8118454e1861939e813d77887e7a823446fa21d1 /backend/authentication
parentUpdate review-policy.yml (diff)
parentMerge branch 'main' into discord-webhook (diff)
Merge pull request #39 from python-discord/discord-webhook
Diffstat (limited to 'backend/authentication')
-rw-r--r--backend/authentication/user.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/authentication/user.py b/backend/authentication/user.py
index 722c348..f40c68c 100644
--- a/backend/authentication/user.py
+++ b/backend/authentication/user.py
@@ -19,3 +19,7 @@ class User(BaseUser):
def display_name(self) -> str:
"""Return username and discriminator as display name."""
return f"{self.payload['username']}#{self.payload['discriminator']}"
+
+ @property
+ def discord_mention(self) -> str:
+ return f"<@{self.payload['id']}>"