Exemplo n.º 1
0
def unload(client: discord.Client, message: discord.Message, name: str.lower):
    """ Unloads a plugin. """
    assert plugins.get_plugin(name), "`{}` is not a loaded plugin.".format(name)

    # The plugin is loaded so we unload it
    yield from plugins.save_plugin(name)
    plugins.unload_plugin(name)
    yield from client.say(message, "Plugin `{}` unloaded.".format(name))
Exemplo n.º 2
0
async def unload(message: discord.Message, name: str.lower):
    """ Unloads a plugin. """
    assert plugins.get_plugin(name), "`{}` is not a loaded plugin.".format(name)

    # The plugin is loaded so we unload it
    await plugins.save_plugin(name)
    plugins.unload_plugin(name)
    await client.say(message, "Plugin `{}` unloaded.".format(name))
Exemplo n.º 3
0
async def unload(message: discord.Message, name: str.lower):
    """ Unloads a plugin. """
    assert plugins.get_plugin(name), "`{}` is not a loaded plugin.".format(name)

    # The plugin is loaded so we unload it
    await plugins.save_plugin(name)
    plugins.unload_plugin(name)
    await client.say(message, "Plugin `{}` unloaded.".format(name))