Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def save_settings(self):
dataIO.save_json('data/imgwelcome/settings.json', self.settings)
def save_settings(self):
return dataIO.save_json("data/useful/settings.json", self.settings)
def check_files():
system = {}
f = "data/holidays/config.json"
if not dataIO.is_valid_json(f):
dataIO.save_json(f, system)
def save_settings(self):
dataIO.save_json("data/cmdsuffix/settings.json", self.settings)
def check_file():
f = 'data/githubcards/settings.json'
if dataIO.is_valid_json(f) is False:
dataIO.save_json(f, {})
def save_repos(self):
dataIO.save_json(self.file_path, self.repos)
def save_list(self):
dataIO.save_json("settings/todo.json", self.todo_list)
to_convert.append(stream["NAME"])
if not to_convert:
return
results = await self.fetch_twitch_ids(*to_convert)
for stream in self.twitch_streams:
for result in results:
if stream["NAME"].lower() == result["name"].lower():
stream["ID"] = result["_id"]
# We might as well delete the invalid / renamed ones
self.twitch_streams = [s for s in self.twitch_streams if "ID" in s]
dataIO.save_json("data/streams/twitch.json", self.twitch_streams)
def save_settings(self):
dataIO.save_json("data/warner/warnings.json", self.settings)
def check_files():
f = "data/customcom/commands.json"
if not dataIO.is_valid_json(f):
print("Creating empty commands.json...")
dataIO.save_json(f, {})