Skip to content

Commit

Permalink
Small doc fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Jan 21, 2020
1 parent 84f54a4 commit 258b90a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions twitchio/ext/commands/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ async def handle_checks(self, context):

def load_module(self, name: str):
"""Method which loads a module and it's cogs.
Parameters
------------
name: str
Expand All @@ -278,7 +279,11 @@ def add_cog(self, cog):
if not isinstance(cog, Cog):
raise InvalidCog('Cogs must derive from "commands.Cog".')

if cog.name in self._cogs:
raise InvalidCog(f'Cog "{cog.name}" has already been loaded.')

cog._load_methods(self)
self._cogs[cog.name] = cog

async def global_before_invoke(self, ctx):
"""|coro|
Expand Down

0 comments on commit 258b90a

Please sign in to comment.