diff --git a/CHANGELOG.md b/CHANGELOG.md index bb06d6fdf..7af6ff3e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 5.0.3 +__11.04.2023__ + +- bug: Always initialize guild caches + ## 5.0.2 __08.04.2023__ diff --git a/lib/src/core/guild/guild.dart b/lib/src/core/guild/guild.dart index 315ec1894..f933d42ab 100644 --- a/lib/src/core/guild/guild.dart +++ b/lib/src/core/guild/guild.dart @@ -678,6 +678,9 @@ class Guild extends SnowflakeEntity implements IGuild { for (final rawSticker in raw["stickers"] as RawApiList) GuildSticker(rawSticker as RawApiMap, client) ]; + autoModerationRules = SnowflakeCache(); + scheduledEvents = SnowflakeCache(); + if (!guildCreate) return; raw["channels"].forEach((o) { @@ -722,9 +725,6 @@ class Guild extends SnowflakeEntity implements IGuild { if (raw["stage_instances"] != null) for (final rawInstance in raw["stage_instances"] as RawApiList) StageChannelInstance(client, rawInstance as RawApiMap) ]; - - autoModerationRules = SnowflakeCache(); - scheduledEvents = SnowflakeCache(); } /// The guild's icon, represented as URL. diff --git a/lib/src/internal/constants.dart b/lib/src/internal/constants.dart index c43c4be87..5d84b90ec 100644 --- a/lib/src/internal/constants.dart +++ b/lib/src/internal/constants.dart @@ -33,7 +33,7 @@ class Constants { static const int apiVersion = 10; /// Version of Nyxx - static const String version = "5.0.2"; + static const String version = "5.0.3"; /// Url to Nyxx repo static const String repoUrl = "https://github.com/nyxx-discord/nyxx"; diff --git a/pubspec.yaml b/pubspec.yaml index b436346c8..84800e876 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: nyxx -version: 5.0.2 +version: 5.0.3 description: A Discord library for Dart. Simple, robust framework for creating discord bots for Dart language. homepage: https://github.com/nyxx-discord/nyxx repository: https://github.com/nyxx-discord/nyxx