Allow setting a per-client default parse mode

This commit is contained in:
Lonami Exo
2018-06-03 11:29:48 +02:00
parent 12812ea542
commit 8b16023566
3 changed files with 97 additions and 41 deletions

View File

@@ -46,6 +46,14 @@ VALID_USERNAME_RE = re.compile(
)
class Default:
"""
Sentinel value to indicate that the default value should be used.
Currently used for the ``parse_mode``, where a ``None`` mode should
be considered different from using the default.
"""
def get_display_name(entity):
"""
Gets the display name for the given entity, if it's an :tl:`User`,