diff options
| author | Rapptz <[email protected]> | 2016-04-29 19:29:48 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-04-29 19:29:48 -0400 |
| commit | 3758c0aa83725d5c40be3aea7f8d7724444a8b16 (patch) | |
| tree | 09891795f8861a88138a89a55f5b9f170788e045 | |
| parent | Add Role.mentionable attribute. (diff) | |
| download | discord.py-3758c0aa83725d5c40be3aea7f8d7724444a8b16.tar.xz discord.py-3758c0aa83725d5c40be3aea7f8d7724444a8b16.zip | |
Member.mention now uses nickname hint if needed.
| -rw-r--r-- | discord/member.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/member.py b/discord/member.py index ccfdc1a9..5acc87f5 100644 --- a/discord/member.py +++ b/discord/member.py @@ -125,3 +125,11 @@ class Member(User): return Colour.default() color = colour + + @property + def mention(self): + if self.nick: + return '<@!{}>'.format(self.id) + return '<@{}>'.format(self.id) + + mention.__doc__ = User.mention.__doc__ |