made encrypt use save_config()
This commit is contained in:
parent
86f39cdb9f
commit
c990e4103b
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ def get_salt(bot):
|
||||||
"""generate an encryption salt if none exists, then returns the salt"""
|
"""generate an encryption salt if none exists, then returns the salt"""
|
||||||
if not bot.config.get("random_salt", False):
|
if not bot.config.get("random_salt", False):
|
||||||
bot.config["random_salt"] = hashlib.md5(os.urandom(16)).hexdigest()
|
bot.config["random_salt"] = hashlib.md5(os.urandom(16)).hexdigest()
|
||||||
json.dump(bot.config, open('config', 'w'), sort_keys=True, indent=2)
|
bot.config.save_config()
|
||||||
return bot.config["random_salt"]
|
return bot.config.get("random_salt")
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
|
|
Reference in a new issue