MCPcopy
hub / github.com/wechaty/python-wechaty / stop_plugin

Method stop_plugin

src/wechaty/plugin.py:792–800  ·  view source on GitHub ↗

stop the plugin

(self, name: str)

Source from the content-addressed store, hash-verified

790 raise WechatyPluginError(f'plugins <{name}> not exist')
791
792 async def stop_plugin(self, name: str) -> None:
793 """stop the plugin"""
794 log.info('stopping the plugin <%s>', name)
795 self._check_plugins(name)
796
797 if self._plugin_status[name] == PluginStatus.Stopped:
798 log.warning('plugins <%s> has stopped', name)
799 self._plugin_status[name] = PluginStatus.Stopped
800 await self._plugins[name].on_stoped()
801
802 async def start_plugin(self, name: str) -> None:
803 """starting the plugin"""

Callers 1

change_statusMethod · 0.95

Calls 2

_check_pluginsMethod · 0.95
on_stopedMethod · 0.80

Tested by

no test coverage detected