docs update
This commit is contained in:
parent
dea09cb5b3
commit
188b69c097
@ -28,6 +28,7 @@ Custom Features
|
||||
- Added support for ``int()`` to ``discord.User``, ``discord.Member``, ``discord.Emoji``, ``discord.Role``, ``discord.Guild``, ``discord.Message``, ``discord.TextChannel``, ``discord.VoiceChannel``, ``discord.CategoryChannel``, ``discord.Attachment`` and ``discord.Message``. This will return their id
|
||||
- Added support for ``str()`` to ``discord.Message``. This will return the message content
|
||||
- Added ``Guild.try_member``
|
||||
- Added ``Context.clean_prefix``
|
||||
|
||||
Key Features
|
||||
-------------
|
||||
|
@ -87,7 +87,9 @@ class Context(discord.abc.Messageable):
|
||||
|
||||
@property
|
||||
def clean_prefix(self):
|
||||
""":class:`str`: The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``."""
|
||||
""":class:`str`: The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``.
|
||||
|
||||
.. versionadded:: 1.5.1.4"""
|
||||
user = self.guild.me if self.guild else self.bot.user
|
||||
pattern = re.compile(r"<@!?%s>" % user.id)
|
||||
return pattern.sub("@%s" % user.display_name.replace('\\', r'\\'), self.prefix)
|
||||
|
@ -33,6 +33,7 @@ Custom Features
|
||||
- Added support for ``int()`` to ``discord.User``, ``discord.Member``, ``discord.Emoji``, ``discord.Role``, ``discord.Guild``, ``discord.Message``, ``discord.TextChannel``, ``discord.VoiceChannel``, ``discord.CategoryChannel``, ``discord.Attachment`` and ``discord.Message``. This will return their id
|
||||
- Added support for ``str()`` to ``discord.Message``. This will return the message content
|
||||
- Added ``Guild.try_member``
|
||||
- Added ``Context.clean_prefix``
|
||||
|
||||
Features
|
||||
--------
|
||||
|
Loading…
x
Reference in New Issue
Block a user