@@ -284,6 +284,13 @@ def load_module(self, name: str):
284284 self ._modules [name ] = module
285285
286286 def unload_module (self , name : str ):
287+ """Method which unloads a module and it's cogs.
288+
289+ Parameters
290+ ----------
291+ name: str
292+ The name of the module to unload in dot.path format.
293+ """
287294 if name not in self ._modules :
288295 raise ValueError (f"Module <{ name } > is not loaded" )
289296
@@ -308,6 +315,18 @@ def unload_module(self, name: str):
308315 del sys .modules [m ]
309316
310317 def reload_module (self , name : str ):
318+ """Method which reloads a module and it's cogs.
319+
320+ Parameters
321+ ----------
322+ name: str
323+ The name of the module to unload in dot.path format.
324+
325+
326+ .. note::
327+
328+ This is roughly equivalent to `bot.unload_module(...)` then `bot.load_module(...)`.
329+ """
311330 if name not in self ._modules :
312331 raise ValueError (f"Module <{ name } > is not loaded" )
313332
@@ -327,7 +346,19 @@ def reload_module(self, name: str):
327346 module .prepare (self )
328347 raise
329348
330- def add_cog (self , cog ):
349+ def add_cog (self , cog : Cog ):
350+ """Method which adds a cog to the bot.
351+
352+ Parameters
353+ ----------
354+ cog: :class:`Cog`
355+ The cog instance to add to the bot.
356+
357+
358+ .. warning::
359+
360+ This must be an instance of :class:`Cog`.
361+ """
331362 if not isinstance (cog , Cog ):
332363 raise InvalidCog ('Cogs must derive from "commands.Cog".' )
333364
@@ -338,6 +369,13 @@ def add_cog(self, cog):
338369 self ._cogs [cog .name ] = cog
339370
340371 def remove_cog (self , cog_name : str ):
372+ """Method which removes a cog from the bot.
373+
374+ Parameters
375+ ----------
376+ cog_name: str
377+ The name of the cog to remove.
378+ """
341379 if cog_name not in self ._cogs :
342380 raise InvalidCog (f"Cog '{ cog_name } ' not found" )
343381
@@ -397,10 +435,12 @@ async def global_after_invoke(self, ctx):
397435
398436 @property
399437 def commands (self ):
438+ """The currently loaded commands."""
400439 return self ._commands
401440
402441 @property
403442 def cogs (self ):
443+ """The currently loaded cogs."""
404444 return self ._cogs
405445
406446 async def event_command_error (self , context , error ):
0 commit comments