Get mentionable nick
This commit is contained in:
parent
0159043895
commit
aaab2b9bbf
2 changed files with 10 additions and 1 deletions
|
|
@ -71,6 +71,15 @@ class Message():
|
|||
else:
|
||||
return time.strftime("%H:%M:%S", time.gmtime(self.time))
|
||||
|
||||
def mentionable(self):
|
||||
"""
|
||||
mentionable() -> str
|
||||
|
||||
Converts the name to a mentionable format.
|
||||
"""
|
||||
|
||||
return "".join(c for c in self.name if not c in ",.!?;&<'\"" and not c.isspace()).lower()
|
||||
|
||||
def is_edited(self):
|
||||
"""
|
||||
is_edited() -> bool
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Session():
|
|||
Converts the name to a mentionable format.
|
||||
"""
|
||||
|
||||
return "".join(c for c in self.name if not c in ",.!?;&<'\"" and not c.isspace())
|
||||
return "".join(c for c in self.name if not c in ",.!?;&<'\"" and not c.isspace()).lower()
|
||||
|
||||
def listable(self, width):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue