mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Add Role.mention property
This commit is contained in:
parent
07adb1d5e9
commit
abb955fdaa
@ -96,3 +96,8 @@ class Role(Hashable):
|
||||
def created_at(self):
|
||||
"""Returns the role's creation time in UTC."""
|
||||
return snowflake_time(self.id)
|
||||
|
||||
@property
|
||||
def mention(self):
|
||||
"""Returns a string that allows you to mention a role."""
|
||||
return '<@&{}>'.format(self.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user