Skip to content

Commit

Permalink
Actually add code to unmount_module
Browse files Browse the repository at this point in the history
  • Loading branch information
nexy7574 committed Oct 16, 2023
1 parent 626e6a6 commit acc49ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/niobot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,15 @@ def mount_module(self, import_path: str) -> typing.Optional[list[Command]]:
self.log.debug("%r does not appear to be a niobot module", item)
return added

def unmount_module(self, import_path: str) -> None:
def unmount_module(self, module: Module) -> None:
"""
Does the opposite of mounting the module.
This will remove any commands that have been added to the bot from the given module.
:param import_path:
:return:
:param module: The module to unmount
"""
self.log.debug("Unmounting module %r", module)
module.__teardown__()

@property
def commands(self) -> dict[str, Command]:
Expand Down

0 comments on commit acc49ca

Please sign in to comment.