diff --git a/redbot/cogs/audio/__init__.py b/redbot/cogs/audio/__init__.py index 2f35ddd32..b13d2a1a3 100644 --- a/redbot/cogs/audio/__init__.py +++ b/redbot/cogs/audio/__init__.py @@ -34,14 +34,14 @@ async def download_lavalink(session): async def maybe_download_lavalink(loop, cog): jar_exists = LAVALINK_JAR_FILE.exists() - current_build = redbot.core.VersionInfo.from_json(await cog.config.current_build()) + current_build = redbot.core.VersionInfo.from_json(await cog.config.current_version()) if not jar_exists or current_build < redbot.core.version_info: log.info("Downloading Lavalink.jar") LAVALINK_DOWNLOAD_DIR.mkdir(parents=True, exist_ok=True) async with ClientSession(loop=loop) as session: await download_lavalink(session) - await cog.config.current_build.set(redbot.core.version_info.to_json()) + await cog.config.current_version.set(redbot.core.version_info.to_json()) shutil.copyfile(str(BUNDLED_APP_YML_FILE), str(APP_YML_FILE)) diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index 9984f841d..ec18d25d5 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -48,7 +48,7 @@ class Audio(commands.Cog): "ws_port": "2332", "password": "youshallnotpass", "status": False, - "current_build": redbot.core.VersionInfo.from_str("3.0.0a0").to_json(), + "current_version": redbot.core.VersionInfo.from_str("3.0.0a0").to_json(), "use_external_lavalink": False, } diff --git a/redbot/core/config.py b/redbot/core/config.py index ec6e27215..70b37f227 100644 --- a/redbot/core/config.py +++ b/redbot/core/config.py @@ -193,7 +193,10 @@ class Group(Value): async def _get(self, default: Dict[str, Any] = ...) -> Dict[str, Any]: default = default if default is not ... else self.defaults raw = await super()._get(default) - return self.nested_update(raw, default) + if isinstance(raw, dict): + return self.nested_update(raw, default) + else: + return raw # noinspection PyTypeChecker def __getattr__(self, item: str) -> Union["Group", Value]: