def call_reload(name: str):
""" Initiates reload of plugin. """
# See if the plugin has an on_reload() function, and call that
if hasattr(plugins[name], "on_reload"):
if callable(plugins[name].on_reload):
result = plugins[name].on_reload(name)
if inspect.isawaitable(result):
await result
else:
await on_reload(name)
评论列表
文章目录