aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/channel.py4
-rw-r--r--discord/client.py2
-rw-r--r--discord/emoji.py4
-rw-r--r--discord/guild.py10
-rw-r--r--discord/player.py4
-rw-r--r--discord/user.py8
-rw-r--r--discord/voice_client.py2
-rw-r--r--discord/webhook.py2
-rw-r--r--docs/conf.py4
9 files changed, 20 insertions, 20 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 32faf983..30e2369c 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -363,7 +363,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
name: str
The webhook's name.
avatar: Optional[bytes]
- A *bytes-like* object representing the webhook's default avatar.
+ A :term:`py:bytes-like object` representing the webhook's default avatar.
This operates similarly to :meth:`~ClientUser.edit`.
Raises
@@ -877,7 +877,7 @@ class GroupChannel(discord.abc.Messageable, Hashable):
The new name to change the group to.
Could be ``None`` to remove the name.
icon: Optional[bytes]
- A bytes-like object representing the new icon.
+ A :term:`py:bytes-like object` representing the new icon.
Could be ``None`` to remove the icon.
Raises
diff --git a/discord/client.py b/discord/client.py
index 7f99252b..31b2a5a1 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -855,7 +855,7 @@ class Client:
The region for the voice communication server.
Defaults to :attr:`VoiceRegion.us_west`.
icon: bytes
- The *bytes-like* object representing the icon. See :meth:`~ClientUser.edit`
+ The :term:`py:bytes-like object` representing the icon. See :meth:`~ClientUser.edit`
for more details on what is expected.
Raises
diff --git a/discord/emoji.py b/discord/emoji.py
index 626b6e21..16b5bbd7 100644
--- a/discord/emoji.py
+++ b/discord/emoji.py
@@ -228,7 +228,7 @@ class Emoji(Hashable):
await self._state.http.delete_custom_emoji(self.guild.id, self.id, reason=reason)
async def edit(self, *, name, roles=None, reason=None):
- """|coro|
+ r"""|coro|
Edits the custom emoji.
@@ -240,7 +240,7 @@ class Emoji(Hashable):
name: str
The new emoji name.
roles: Optional[list[:class:`Role`]]
- A :class:`list` of :class:`Role`s that can use this emoji. Leave empty to make it available to everyone.
+ A :class:`list` of :class:`Role`\s that can use this emoji. Leave empty to make it available to everyone.
reason: Optional[str]
The reason for editing this emoji. Shows up on the audit log.
diff --git a/discord/guild.py b/discord/guild.py
index 46621e83..ed0d7c4c 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -688,10 +688,10 @@ class Guild(Hashable):
name: str
The new name of the guild.
icon: bytes
- A *bytes-like* object representing the icon. Only PNG/JPEG supported.
+ A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG supported.
Could be ``None`` to denote removal of the icon.
splash: bytes
- A *bytes-like* object representing the invite splash.
+ A :term:`py:bytes-like object` representing the invite splash.
Only PNG/JPEG supported. Could be ``None`` to denote removing the
splash. Only available for partnered guilds with ``INVITE_SPLASH``
feature.
@@ -987,7 +987,7 @@ class Guild(Hashable):
return result
async def create_custom_emoji(self, *, name, image, roles=None, reason=None):
- """|coro|
+ r"""|coro|
Creates a custom :class:`Emoji` for the guild.
@@ -1003,10 +1003,10 @@ class Guild(Hashable):
name: str
The emoji name. Must be at least 2 characters.
image: bytes
- The *bytes-like* object representing the image data to use.
+ The :term:`py:bytes-like object` representing the image data to use.
Only JPG and PNG images are supported.
roles: Optional[list[:class:`Role`]]
- A :class:`list` of :class:`Role`s that can use this emoji. Leave empty to make it available to everyone.
+ A :class:`list` of :class:`Role`\s that can use this emoji. Leave empty to make it available to everyone.
reason: Optional[str]
The reason for creating this emoji. Shows up on the audit log.
diff --git a/discord/player.py b/discord/player.py
index a882287b..c645ae66 100644
--- a/discord/player.py
+++ b/discord/player.py
@@ -54,8 +54,8 @@ class AudioSource:
Subclasses must implement this.
- If the audio is complete, then returning an empty *bytes-like* object
- to signal this is the way to do so.
+ If the audio is complete, then returning an empty
+ :term:`py:bytes-like object` to signal this is the way to do so.
If :meth:`is_opus` method returns ``True``, then it must return
20ms worth of Opus encoded audio. Otherwise, it must be 20ms
diff --git a/discord/user.py b/discord/user.py
index 3fa5090d..eb9289bb 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -323,10 +323,10 @@ class ClientUser(BaseUser):
Note
-----
- To upload an avatar, a *bytes-like object* must be passed in that
+ To upload an avatar, a :term:`py:bytes-like object` must be passed in that
represents the image being uploaded. If this is done through a file
then the file must be opened via ``open('some_filename', 'rb')`` and
- the *bytes-like object* is given through the use of ``fp.read()``.
+ the :term:`py:bytes-like object` is given through the use of ``fp.read()``.
The only image formats supported for uploading is JPEG and PNG.
@@ -341,14 +341,14 @@ class ClientUser(BaseUser):
email: str
The new email you wish to change to.
Only applicable to user accounts.
- Optional[:class:`HypeSquadHouse`]
+ house: Optional[:class:`HypeSquadHouse`]
The hypesquad house you wish to change to.
Could be ``None`` to leave the current house.
Only applicable to user accounts.
username :str
The new username you wish to change to.
avatar: bytes
- A *bytes-like object* representing the image to upload.
+ A :term:`py:bytes-like object` representing the image to upload.
Could be ``None`` to denote no avatar.
Raises
diff --git a/discord/voice_client.py b/discord/voice_client.py
index f92cc24e..7479031e 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -392,7 +392,7 @@ class VoiceClient:
Parameters
----------
data: bytes
- The *bytes-like object* denoting PCM or Opus voice data.
+ The :term:`py:bytes-like object` denoting PCM or Opus voice data.
encode: bool
Indicates if ``data`` should be encoded into Opus.
diff --git a/discord/webhook.py b/discord/webhook.py
index d9671b82..30b5073a 100644
--- a/discord/webhook.py
+++ b/discord/webhook.py
@@ -525,7 +525,7 @@ class Webhook:
name: Optional[str]
The webhook's new default name.
avatar: Optional[bytes]
- A *bytes-like* object representing the webhook's new default avatar.
+ A :term:`py:bytes-like object` representing the webhook's new default avatar.
Raises
-------
diff --git a/docs/conf.py b/docs/conf.py
index a9c214f7..56ffc572 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -46,7 +46,7 @@ extlinks = {
}
# Links used for cross-referencing stuff in other documentation
-intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
+intersphinx_mapping = {'py': ('https://docs.python.org/3', None)}
rst_prolog = """
.. |coro| replace:: This function is a |corourl|_.
@@ -314,4 +314,4 @@ texinfo_documents = [
def setup(app):
app.add_javascript('custom.js')
if app.config.language == 'ja':
- app.config.intersphinx_mapping['python'] = ('https://docs.python.org/ja/3', None)
+ app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None)