Repository: Pycord-Development/pycord

Issue:
Docs broken with latest changes to master
Traceback shown here 
```
Running Sphinx v4.2.0
loading translations [en]... done
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.aiohttp.org/en/stable/objects.inv...
loading intersphinx inventory from https://docs.python-requests.org/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 18 source files that are out of date
updating environment: [new config] 18 added, 0 changed, 0 removed
reading sources... [  5%] api
reading sources... [ 11%] discord
reading sources... [ 16%] ext/commands/api
reading sources... [ 22%] ext/commands/cogs
reading sources... [ 27%] ext/commands/commands
reading sources... [ 33%] ext/commands/extensions
reading sources... [ 38%] ext/commands/index
reading sources... [ 44%] ext/tasks/index
reading sources... [ 50%] faq
reading sources... [ 55%] index
reading sources... [ 61%] intents
reading sources... [ 66%] intro
reading sources... [ 72%] logging
reading sources... [ 77%] migrating
reading sources... [ 83%] migrating_to_async
reading sources... [ 88%] quickstart
reading sources... [ 94%] version_guarantees
reading sources... [100%] whats_new

/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.Bot:43: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.Bot:51: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.add_check:6: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.add_check:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.after_invoke:7: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.after_invoke:12: WARNING: Literal block ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.before_invoke:7: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.before_invoke:11: WARNING: Literal block ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check:6: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check:7: WARNING: Literal block ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check:12: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 8 supplied.

.. code-block:: python3
    @bot.check
    def check_commands(ctx):
        return ctx.command.qualified_name in allowed_commands
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check_once:9: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check_once:12: WARNING: Literal block ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check_once:14: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check_once:19: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 8 supplied.

.. code-block:: python3
    @bot.check_once
    def whitelist(ctx):
        return ctx.message.author.id in my_whitelist
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.remove_check:6: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.remove_check:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:13: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:15: WARNING: Unexpected indentation.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:17: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:18: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/docs/api.rst:3955: WARNING: Title underline too short.

WelcomeScreenChannel
~~~~~~~~~~~~~~~
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/docs/api.rst:3955: WARNING: Title underline too short.

WelcomeScreenChannel
~~~~~~~~~~~~~~~
WARNING: autodoc: failed to import class 'CogMeta' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'CogMeta'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: CogMeta

WARNING: autodoc: failed to import exception 'ExtensionError' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'ExtensionError'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: ExtensionError

WARNING: autodoc: failed to import exception 'ExtensionAlreadyLoaded' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'ExtensionAlreadyLoaded'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: ExtensionAlreadyLoaded

WARNING: autodoc: failed to import exception 'ExtensionNotLoaded' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'ExtensionNotLoaded'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: ExtensionNotLoaded

WARNING: autodoc: failed to import exception 'NoEntryPointError' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'NoEntryPointError'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: NoEntryPointError

WARNING: autodoc: failed to import exception 'ExtensionFailed' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'ExtensionFailed'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: ExtensionFailed

WARNING: autodoc: failed to import exception 'ExtensionNotFound' from module 'discord.ext.commands'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 423, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'discord.ext.commands' has no attribute 'ExtensionNotFound'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 332, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2771, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/util/inspect.py", line 439, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: ExtensionNotFound

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  5%] api
writing output... [ 11%] discord
writing output... [ 16%] ext/commands/api
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.add_check:6: WARNING: more than one target found for cross-reference 'invoke': discord.ext.commands.Bot.invoke, discord.ext.commands.Context.invoke
/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/discord/bot.py:docstring of discord.bot.BotBase.check_once:1: WARNING: more than one target found for cross-reference 'invoke': discord.ext.commands.Bot.invoke, discord.ext.commands.Context.invoke

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/events.py", line 101, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/docs/extensions/attributetable.py", line 154, in process_attributetable
    groups = get_class_results(lookup, modulename, classname, fullname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/checkouts/master/docs/extensions/attributetable.py", line 170, in get_class_results
    cls = getattr(module, name)
AttributeError: module 'discord.ext.commands' has no attribute 'CogMeta'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/application.py", line 343, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 293, in build_update
    self.build(to_build,
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 357, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 531, in write
    self._write_serial(sorted(docnames))
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 538, in _write_serial
    doctree = self.env.get_and_resolve_doctree(docname, self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/environment/__init__.py", line 532, in get_and_resolve_doctree
    self.apply_post_transforms(doctree, docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/environment/__init__.py", line 583, in apply_post_transforms
    self.events.emit('doctree-resolved', doctree, docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pycord/envs/master/lib/python3.8/site-packages/sphinx/events.py", line 109, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function process_attributetable at 0x7fb73a5c8f70> for event 'doctree-resolved' threw an exception (exception: module 'discord.ext.commands' has no attribute 'CogMeta')

Extension error (attributetable):
Handler <function process_attributetable at 0x7fb73a5c8f70> for event 'doctree-resolved' threw an exception (exception: module 'discord.ext.commands' has no attribute 'CogMeta')
```


Discussion:

Resolving patch:
diff --git a/discord/bot.py b/discord/bot.py
--- a/discord/bot.py
+++ b/discord/bot.py
@@ -441,17 +441,22 @@ def check(self, func):
         A global check is similar to a :func:`.check` that is applied
         on a per command basis except it is run before any command checks
         have been verified and applies to every command the bot has.
+
         .. note::
+
             This function can either be a regular function or a coroutine.
         Similar to a command :func:`.check`\, this takes a single parameter
         of type :class:`.Context` and can only raise exceptions inherited from
         :exc:`.CommandError`.
+
         Example
         ---------
         .. code-block:: python3
+
             @bot.check
             def check_commands(ctx):
                 return ctx.command.qualified_name in allowed_commands
+
         """
         # T was used instead of Check to ensure the type matches on return
         self.add_check(func)  # type: ignore
@@ -461,6 +466,7 @@ def add_check(self, func, *, call_once: bool = False) -> None:
         """Adds a global check to the bot.
         This is the non-decorator interface to :meth:`.check`
         and :meth:`.check_once`.
+
         Parameters
         -----------
         func
@@ -468,6 +474,7 @@ def add_check(self, func, *, call_once: bool = False) -> None:
         call_once: :class:`bool`
             If the function should only be called once per
             :meth:`.invoke` call.
+
         """
 
         if call_once:
@@ -479,6 +486,7 @@ def remove_check(self, func, *, call_once: bool = False) -> None:
         """Removes a global check from the bot.
         This function is idempotent and will not raise an exception
         if the function is not in the global checks.
+
         Parameters
         -----------
         func
@@ -486,6 +494,7 @@ def remove_check(self, func, *, call_once: bool = False) -> None:
         call_once: :class:`bool`
             If the function was added with ``call_once=True`` in
             the :meth:`.Bot.add_check` call or using :meth:`.check_once`.
+
         """
         l = self._check_once if call_once else self._checks
 
@@ -502,21 +511,28 @@ def check_once(self, func):
         or :meth:`.Command.can_run` is called. This type of check
         bypasses that and ensures that it's called only once, even inside
         the default help command.
+
         .. note::
+
             When using this function the :class:`.Context` sent to a group subcommand
             may only parse the parent command and not the subcommands due to it
             being invoked once per :meth:`.Bot.invoke` call.
+
         .. note::
+
             This function can either be a regular function or a coroutine.
         Similar to a command :func:`.check`\, this takes a single parameter
         of type :class:`.Context` and can only raise exceptions inherited from
         :exc:`.CommandError`.
+
         Example
         ---------
         .. code-block:: python3
+
             @bot.check_once
             def whitelist(ctx):
                 return ctx.message.author.id in my_whitelist
+
         """
         self.add_check(func, call_once=True)
         return func
@@ -537,15 +553,19 @@ def before_invoke(self, coro):
         called. This makes it a useful function to set up database
         connections or any type of set up required.
         This pre-invoke hook takes a sole parameter, a :class:`.Context`.
+
         .. note::
+
             The :meth:`~.Bot.before_invoke` and :meth:`~.Bot.after_invoke` hooks are
             only called if all checks and argument parsing procedures pass
             without error. If any check or argument parsing procedures fail
             then the hooks are not called.
+
         Parameters
         -----------
         coro: :ref:`coroutine <coroutine>`
             The coroutine to register as the pre-invoke hook.
+
         Raises
         -------
         TypeError
@@ -563,20 +583,25 @@ def after_invoke(self, coro):
         called. This makes it a useful function to clean-up database
         connections or any type of clean up required.
         This post-invoke hook takes a sole parameter, a :class:`.Context`.
+
         .. note::
+
             Similar to :meth:`~.Bot.before_invoke`\, this is not called unless
             checks and argument parsing procedures succeed. This hook is,
             however, **always** called regardless of the internal command
             callback raising an error (i.e. :exc:`.CommandInvokeError`\).
             This makes it ideal for clean-up scenarios.
+
         Parameters
         -----------
         coro: :ref:`coroutine <coroutine>`
             The coroutine to register as the post-invoke hook.
+
         Raises
         -------
         TypeError
             The coroutine passed is not actually a coroutine.
+
         """
         if not asyncio.iscoroutinefunction(coro):
             raise TypeError('The post-invoke hook must be a coroutine.')
@@ -616,10 +641,12 @@ class Bot(BotBase, Client):
         Guild ID of a guild to use for testing commands. Prevents setting global commands
         in favor of guild commands, which update instantly.
         .. note::
+
             The bot will not create any global commands if a debug_guild is passed.
     debug_guilds: Optional[List[:class:`int`]]
         Guild IDs of guilds to use for testing commands. This is similar to debug_guild.
         .. note::
+
             You cannot set both debug_guild and debug_guilds.
     """
 
diff --git a/discord/welcome_screen.py b/discord/welcome_screen.py
--- a/discord/welcome_screen.py
+++ b/discord/welcome_screen.py
@@ -44,6 +44,7 @@
     'WelcomeScreenChannel',
 )
 
+
 class WelcomeScreenChannel:
     """Represents a welcome channel displayed on :class:`WelcomeScreen`
     
@@ -82,11 +83,10 @@ def to_dict(self) -> WelcomeScreenChannelPayload:
         else:
             # unicode emoji or None
             dict_['emoji_name'] = self.emoji
-            dict_['emoji_id'] = None # type: ignore
+            dict_['emoji_id'] = None  # type: ignore
 
         return dict_
 
-    
     @classmethod
     def _from_dict(cls, data: WelcomeScreenChannelPayload, guild: Guild) -> WelcomeChannel:
         channel_id = _get_as_snowflake(data, 'channel_id')
@@ -105,7 +105,6 @@ def _from_dict(cls, data: WelcomeScreenChannelPayload, guild: Guild) -> WelcomeC
         return cls(channel=channel, description=description, emoji=emoji)  # type: ignore
 
 
-
 class WelcomeScreen:
     """Represents the welcome screen of a guild.
 
@@ -130,7 +129,6 @@ def __repr__(self):
     def _update(self, data: WelcomeScreenPayload):
         self.description: str = data.get('description')
         self.welcome_channels: List[WelcomeScreenChannel] = [WelcomeScreenChannel._from_dict(channel, self._guild) for channel in data.get('welcome_channels', [])]
-    
 
     @property
     def enabled(self) -> bool:
@@ -141,8 +139,7 @@ def enabled(self) -> bool:
     def guild(self) -> Guild:
         """:class:`Guild`: The guild this welcome screen belongs to."""
         return self._guild
-    
-    
+
     @overload
     async def edit(
         self,
@@ -166,7 +163,10 @@ async def edit(self, **options):
         You must have the :attr:`~Permissions.manage_guild` permission in the
         guild to do this.
         
-        Usage: ::
+        Example
+        --------
+        .. code-block:: python3
+
             rules_channel = guild.get_channel(12345678)
             announcements_channel = guild.get_channel(87654321)
             custom_emoji = utils.get(guild.emojis, name='loudspeaker')


Test patch: