How to use the cogs.utils.dataIO.dataIO.save_json function in Cogs

To help you get started, we’ve selected a few Cogs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aikaterna / aikaterna-cogs / imgwelcome / imgwelcome.py View on Github external
async def save_settings(self):
        dataIO.save_json('data/imgwelcome/settings.json', self.settings)
github PlanetTeamSpeakk / PTSCogs / useful / useful.py View on Github external
def save_settings(self):
        return dataIO.save_json("data/useful/settings.json", self.settings)
github fixator10 / Fixator10-Cogs / holidays / holidays.py View on Github external
def check_files():
    system = {}
    f = "data/holidays/config.json"
    if not dataIO.is_valid_json(f):
        dataIO.save_json(f, system)
github PlanetTeamSpeakk / PTSCogs / cmdsuffix / cmdsuffix.py View on Github external
def save_settings(self):
        dataIO.save_json("data/cmdsuffix/settings.json", self.settings)
github Kowlin / refactored-cogs / githubcards / githubcards.py View on Github external
def check_file():
    f = 'data/githubcards/settings.json'
    if dataIO.is_valid_json(f) is False:
        dataIO.save_json(f, {})
github Cog-Creators / Red-DiscordBot / cogs / downloader.py View on Github external
def save_repos(self):
        dataIO.save_json(self.file_path, self.repos)
github appu1232 / Discord-Selfbot / cogs / todo.py View on Github external
def save_list(self):
        dataIO.save_json("settings/todo.json", self.todo_list)
github Cog-Creators / Red-DiscordBot / cogs / streams.py View on Github external
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)
github PlanetTeamSpeakk / PTSCogs / warner / warner.py View on Github external
def save_settings(self):
        dataIO.save_json("data/warner/warnings.json", self.settings)
github Cog-Creators / Red-DiscordBot / cogs / customcom.py View on Github external
def check_files():
    f = "data/customcom/commands.json"
    if not dataIO.is_valid_json(f):
        print("Creating empty commands.json...")
        dataIO.save_json(f, {})