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)))
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)}" )