aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadir Chowdhury <[email protected]>2021-04-16 03:41:41 +0100
committerGitHub <[email protected]>2021-04-15 22:41:41 -0400
commit8f9819eb4c1c0ddd477c8ff4f80deec8aea054cc (patch)
tree56eaf6a67ae68052b6ea78baea2bc1b8484b002a
parent[commands] Remove HelpCommand.clean_prefix (#6736) (diff)
downloaddiscord.py-8f9819eb4c1c0ddd477c8ff4f80deec8aea054cc.tar.xz
discord.py-8f9819eb4c1c0ddd477c8ff4f80deec8aea054cc.zip
[docs] Fix various unresolved references
-rw-r--r--discord/abc.py6
-rw-r--r--discord/embeds.py2
-rw-r--r--discord/message.py6
-rw-r--r--docs/ext/commands/commands.rst5
-rw-r--r--docs/ext/commands/extensions.rst4
-rw-r--r--docs/faq.rst6
6 files changed, 16 insertions, 13 deletions
diff --git a/discord/abc.py b/discord/abc.py
index 5fd4f188..73376b7c 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -780,10 +780,10 @@ class GuildChannel(Protocol):
Whether to move the channel to the end of the
channel list (or category if given).
This is mutually exclusive with ``beginning``, ``before``, and ``after``.
- before: :class:`abc.Snowflake`
+ before: :class:`~discord.abc.Snowflake`
The channel that should be before our current channel.
This is mutually exclusive with ``beginning``, ``end``, and ``after``.
- after: :class:`abc.Snowflake`
+ after: :class:`~discord.abc.Snowflake`
The channel that should be after our current channel.
This is mutually exclusive with ``beginning``, ``end``, and ``before``.
offset: :class:`int`
@@ -793,7 +793,7 @@ class GuildChannel(Protocol):
while a negative number moves it above. Note that this
number is relative and computed after the ``beginning``,
``end``, ``before``, and ``after`` parameters.
- category: Optional[:class:`abc.Snowflake`]
+ category: Optional[:class:`~discord.abc.Snowflake`]
The category to move this channel under.
If ``None`` is given then it moves it out of the category.
This parameter is ignored if moving a category channel.
diff --git a/discord/embeds.py b/discord/embeds.py
index 8679b36d..3aaaeff3 100644
--- a/discord/embeds.py
+++ b/discord/embeds.py
@@ -528,7 +528,7 @@ class Embed:
@property
def fields(self) -> List[_EmbedFieldProxy]:
- """Union[List[:class:`EmbedProxy`], :attr:`Empty`]: Returns a :class:`list` of ``EmbedProxy`` denoting the field contents.
+ """List[Union[``EmbedProxy``, :attr:`Empty`]]: Returns a :class:`list` of ``EmbedProxy`` denoting the field contents.
See :meth:`add_field` for possible values you can access.
diff --git a/discord/message.py b/discord/message.py
index a7a83312..51347770 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -1263,8 +1263,8 @@ class Message(Hashable):
async def reply(self, content=None, **kwargs):
"""|coro|
- A shortcut method to :meth:`abc.Messageable.send` to reply to the
- :class:`Message`.
+ A shortcut method to :meth:`.abc.Messageable.send` to reply to the
+ :class:`.Message`.
.. versionadded:: 1.6
@@ -1280,7 +1280,7 @@ class Message(Hashable):
Returns
---------
- :class:`Message`
+ :class:`.Message`
The message that was sent.
"""
diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst
index c5ad3037..b0dc3466 100644
--- a/docs/ext/commands/commands.rst
+++ b/docs/ext/commands/commands.rst
@@ -328,7 +328,7 @@ For example, a common idiom would be to have a class and a converter for that cl
else:
await ctx.send("Hm you're not so new.")
-This can get tedious, so an inline advanced converter is possible through a ``classmethod`` inside the type:
+This can get tedious, so an inline advanced converter is possible through a :func:`classmethod` inside the type:
.. code-block:: python3
@@ -380,6 +380,7 @@ A lot of discord models work out of the gate as a parameter:
- :class:`PartialMessage` (since v1.7)
- :class:`TextChannel`
- :class:`VoiceChannel`
+- :class:`StageChannel` (since v1.7)
- :class:`StoreChannel` (since v1.7)
- :class:`CategoryChannel`
- :class:`Invite`
@@ -411,6 +412,8 @@ converter is given below:
+--------------------------+-------------------------------------------------+
| :class:`VoiceChannel` | :class:`~ext.commands.VoiceChannelConverter` |
+--------------------------+-------------------------------------------------+
+| :class:`StageChannel` | :class:`~ext.commands.StageChannelConverter` |
++--------------------------+-------------------------------------------------+
| :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` |
+--------------------------+-------------------------------------------------+
| :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` |
diff --git a/docs/ext/commands/extensions.rst b/docs/ext/commands/extensions.rst
index 3cb6d297..20aa6e12 100644
--- a/docs/ext/commands/extensions.rst
+++ b/docs/ext/commands/extensions.rst
@@ -27,7 +27,7 @@ An example extension looks like this:
def setup(bot):
bot.add_command(hello)
-In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``.
+In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``.
.. admonition:: Cogs
:class: helpful
@@ -41,7 +41,7 @@ In this example we define a simple command, and when the extension is loaded thi
Reloading
-----------
-When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`.
+When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`.Bot.reload_extension`.
.. code-block:: python3
diff --git a/docs/faq.rst b/docs/faq.rst
index f196f2b4..aa5bf976 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -236,7 +236,7 @@ technically in another thread, we must take caution in calling thread-safe opera
us, :mod:`asyncio` comes with a :func:`asyncio.run_coroutine_threadsafe` function that allows us to call
a coroutine from another thread.
-However, this function returns a :class:`concurrent.Future` and to actually call it we have to fetch its result. Putting all of
+However, this function returns a :class:`~concurrent.futures.Future` and to actually call it we have to fetch its result. Putting all of
this together we can do the following: ::
def my_after(error):
@@ -297,7 +297,7 @@ How do I make a web request?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To make a request, you should use a non-blocking library.
-This library already uses and requires a 3rd party library for making requests, ``aiohttp``.
+This library already uses and requires a 3rd party library for making requests, :doc:`aiohttp <aio:index>`.
Quick example: ::
@@ -395,7 +395,7 @@ Example: ::
How do I make a subcommand?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Use the ``group`` decorator. This will transform the callback into a ``Group`` which will allow you to add commands into
+Use the :func:`~ext.commands.group` decorator. This will transform the callback into a :class:`~ext.commands.Group` which will allow you to add commands into
the group operating as "subcommands". These groups can be arbitrarily nested as well.
Example: ::