def reload(message, args): if len(args) > 1: message.message.reply( "Zero or one argument (reloadtype (prefs)) needed!") return None if len(args) == 0: reloadType = "all" else: reloadType = args[0] if reloadType == "prefs": PREFS.load() message.message.reply("**Preference reload complete.**")
def reload(message, args): if len(args) > 1: message.message.reply( "Zero or one argument (reloadtype (prefs, commands, all)) needed!") return None if len(args) == 0: reloadType = "all" else: reloadType = args[0] if reloadType == "prefs": PREFS.load() message.message.reply("**Preference reload complete.**") elif reloadType == "plugins": reload(WolfCore) message.message.reply("**Plugin reload complete.**") elif reloadType == "all": PREFS.load() os.execl(sys.executable, sys.executable, *sys.argv) message.message.reply("**Full reload complete.**")