mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 00:25:14 +00:00
[commads] Change cog/extension load/unload methods to be async
This commit is contained in:
@ -58,7 +58,7 @@ Once you have defined your cogs, you need to tell the bot to register the cogs t
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
bot.add_cog(Greetings(bot))
|
||||
await bot.add_cog(Greetings(bot))
|
||||
|
||||
This binds the cog to the bot, adding all commands and listeners to the bot automatically.
|
||||
|
||||
@ -66,7 +66,7 @@ Note that we reference the cog by name, which we can override through :ref:`ext_
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
bot.remove_cog('Greetings')
|
||||
await bot.remove_cog('Greetings')
|
||||
|
||||
Using Cogs
|
||||
-------------
|
||||
@ -112,6 +112,7 @@ As cogs get more complicated and have more commands, there comes a point where w
|
||||
|
||||
They are as follows:
|
||||
|
||||
- :meth:`.Cog.cog_load`
|
||||
- :meth:`.Cog.cog_unload`
|
||||
- :meth:`.Cog.cog_check`
|
||||
- :meth:`.Cog.cog_command_error`
|
||||
|
Reference in New Issue
Block a user