Esempio n. 1
0
async def unload(event):
    if event.fwd_from:
        return
    shortname = event.pattern_match["shortname"]
    try:
        remove_plugin(shortname)
        qwe = await eor(event, f"Jarvis Has Successfully unloaded {shortname}")
    except Exception as e:
        await qwe.edit(
            "Jarvis has Successfully unloaded {shortname}\n{}".format(
                shortname, str(e)))
Esempio n. 2
0
async def load(event):
    if event.fwd_from:
        return
    shortname = event.pattern_match["shortname"]
    try:
        try:
            remove_plugin(shortname)
        except BaseException:
            pass
        load_module(shortname)
        qwe = await eor(event, f"Successfully loaded {shortname}")
    except Exception as e:
        await qwe.edit(
            f"Jarvis could not load {shortname} because of the following error.\n{str(e)}"
        )