mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 18:02:31 -05:00
[Config] Rewrite (#869)
This commit is contained in:
@@ -30,7 +30,7 @@ class Downloader:
|
||||
def __init__(self, bot: Red):
|
||||
self.bot = bot
|
||||
|
||||
self.conf = Config.get_conf(self, unique_identifier=998240343,
|
||||
self.conf = Config.get_conf(self, identifier=998240343,
|
||||
force_registration=True)
|
||||
|
||||
self.conf.register_global(
|
||||
@@ -73,7 +73,7 @@ class Downloader:
|
||||
|
||||
if cog_json not in installed:
|
||||
installed.append(cog_json)
|
||||
await self.conf.set("installed", installed)
|
||||
await self.conf.installed.set(installed)
|
||||
|
||||
async def _remove_from_installed(self, cog: Installable):
|
||||
"""
|
||||
@@ -86,7 +86,7 @@ class Downloader:
|
||||
|
||||
if cog_json in installed:
|
||||
installed.remove(cog_json)
|
||||
await self.conf.set("installed", installed)
|
||||
await self.conf.installed.set(installed)
|
||||
|
||||
async def _reinstall_cogs(self, cogs: Tuple[Installable]) -> Tuple[Installable]:
|
||||
"""
|
||||
|
||||
@@ -526,4 +526,4 @@ class RepoManager:
|
||||
|
||||
async def _save_repos(self):
|
||||
repo_json_info = {name: r.to_json() for name, r in self._repos.items()}
|
||||
await self.downloader_config.set("repos", repo_json_info)
|
||||
await self.downloader_config.repos.set(repo_json_info)
|
||||
|
||||
Reference in New Issue
Block a user